LikEE
ExpressionEngine 1.x, ExpressionEngine 2
Back to this add-on's main page
View Other Add-ons From The Outfit
concurrent likee:likes calls
Support Request
jmorriso
|
Posted: 11 July 2012 10:01 AM |
|
|
|
Background: I’m attempting to list the single “most liked entry” and single “least liked entry” on two separate lines, within the context of a stats page.
Because the type=“dislike” is a parameter of {exp:likee:likes} itself I used two separate calls as below.
Code:
<p class="x">most liked entry: {exp:likee:likes weblog="x" type="liked" limit="1"}<a href="{url_title}">{title}</a>{/exp:likee:likes}</p> <p class="x">least liked entry: {exp:likee:likes weblog="x" type="disliked" limit="1"}<a href="{url_title}">{title}</a>{/exp:likee:likes}</p>
Problem: The code as listed above returns no results.
I’ve tried many different configurations of this set-up (removing each parameter one by one, moving the {exp:likee:likes} outside the container elements, changing the type of container element, etc) some of which return a result, but none of which return the desired result of 1 “most liked” and 1 “least liked” entry title. The best I get is one of two calls returning a correct result with the other blank.
Removing the limit=“1” parameter allows each separate call to return results, but obviously not a single result, which is the goal.
Any ideas?
|
|
|
The Outfit, Inc
|
Posted: 13 July 2012 08:23 AM |
# 1
|
|
Developer
|
Hey there!
I gave the exact code you have listed above a try (obviously replacing out the channel variable) and it output the correct information.
I’m wondering if it could be a problem because it is nested within another module on your end. Can you try moving the most liked/disliked code into an embed and including that in your template?
Michael
|
|
|
jmorriso
|
Posted: 13 July 2012 08:58 AM |
# 2
|
|
|
Hey,
Embedding has same result unfortunately. Both calls are consistently blank for me with code as given above. Only removing the limit=“1” from each results in output.
The code isn’t nested within another module, but the page is a “stats” kind of page so EE’s {exp:stats} as well as {exp:tag:stats} and {exp:tag:cloud} calls (from Solspace’s Tag module) exist on the page. Removing those altogether does not change the Likes output however, so I’m stumped.
|
|
|
The Outfit, Inc
|
Posted: 13 July 2012 09:10 AM |
# 3
|
|
Developer
|
Can you try creating a blank template and ONLY putting the most liked/disliked code in it? I just can’t seem to recreate the issue over here, it is all working as expected on my end.
|
|
|
jmorriso
|
Posted: 13 July 2012 09:50 AM |
# 4
|
|
|
Putting it on an a clean template didn’t solve it… but I figured it out.
I had initially copied the likes code from your docs and they still use the old EE1 “weblog” syntax.
I’m on EE2 so I changed the the weblog=“x” parameter to channel=“x” instead and presto!
Always something silly isnt it?
Thanks for the help.
|
|
|