Module

Archived
Forum
(read-only)


For official support, visit the official support site »

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
jmorriso

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:

<class="x">most liked entry{exp:likee:likes weblog="x" type="liked" limit="1"}<a href="{url_title}">{title}</a>{/exp:likee:likes}</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
# 1
Developer
The Outfit, Inc

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
# 2
jmorriso

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
# 3
Developer
The Outfit, Inc

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
# 4
jmorriso

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.