Most Liked

Entries

LikEE makes it easy for you to output a list of your most liked and/or disliked entries. Just add the {exp:likee:likes} tags into any template:

<ul>
  {exp:likee:likes channel="your-channel"}
    <li>{title} - {count} likes, {opposite_count} dislikes</li>
  {/exp:likee:likes}
</ul>

Parameters for {exp:likee:likes}

All parameters are optional unless otherwise mentioned.

channel or weblog (required)

This is the only required parameter for the {exp:likee:likes} tag.

channel="your-channel"
weblog="your-weblog"

You can also add multiple channels/weblogs, separating them with a pipe:

channel="your-channel|your-other-channel"
weblog="your-weblog|your-other-weblog"

order_by

This parameter defaults to count, outputting your list of likes and dislikes based on the number of votes received. You can override this functionality by setting this parameter to date. This will output a list of likes and dislikes based upon when they were received.

order_by="date"

sort

The sorting of your results defaults to descending (desc), but you can use this parameter to set it to ascending (asc), the only other option.

sort="asc"

limit

Limit the number of results returned by specifying a number here. Useful, for example, if you only want to output your top 3 most liked articles.

limit="3"

type

By default, the {exp:likee:likes} tag outputs its results based on the number of likes. You can override this and output your results based on the number of dislikes with this parameter. The only options are liked and disliked.

type="disliked"

only_current_user

By default, the {exp:likee:likes} tag outputs a list of everyone’s likes and dislikes. You can limit this to only the current user by setting only_current_user to true. If this value is set, it will first check to see if the current user is logged in and has any likes or dislikes associated. If the user is not logged in, it will then check to see if the user has anonymously (cookie) liked or disliked anything, and use that instead.

only_current_user="true"

Variables for {exp:likee:likes}

{count}

The count variable outputs the number of likes and dislikes for a given entry. If you did not set the type parameter, this will default to the number of likes. If you used the type parameter to override the default functionality to order by disliked, this will output the number of dislikes.

{opposite_count}

The opposite_count variable outputs the count of the opposite type from the count variable. For example, if the count variable is outputting the number of likes, the opposite_count variable will output the number of dislikes.

{entry_id}

The entry_id variable outputs the entry_id of liked or disliked content.

{title}

The title variable outputs the title of liked or disliked content.

{url_title}

The url_title variable outputs the url_title of liked or disliked content.

{channel_id} or {weblog_id}

The channel_id or weblog_id variables output the channel_id or weblog_id of liked or disliked content.

Comments

LikEE makes it easy for you to output a list of your most liked and/or disliked comments; add the {exp:likee:comments} tags into any template:

<dl>
  {exp:likee:comments channel="default_site"}
    <dt>{name} ({count} likes, {opposite_count} dislikes)</dt>
    <dd>{comment}</dd>
  {/exp:likee:comments}
</dl>

Parameters for {exp:likee:comments}

All parameters are optional unless otherwise mentioned.

channel or weblog (required)

This is the only required parameter for the {exp:likee:comments} tag.

channel="your-channel"
weblog="your-weblog"

You can also add multiple channels/weblogs, separating them with a pipe:

channel="your-channel|your-other-channel"
weblog="your-weblog|your-other-weblog"

order_by

This parameter defaults to count, outputting your list of likes and dislikes based on the number of votes received. You can override this functionality by setting this parameter to date. This will output a list of likes and dislikes based upon when they were received.

order_by="date"

entry_id or url_title

Optionally narrow the {exp:likee:comments} tag results by entry_id or url_title.

entry_id="42"
url_title="dont-panic"

sort

The sorting of your results defaults to descending (desc), but you can use this parameter to set it to ascending (asc), the only other option.

sort="asc"

limit

Limit the number of results returned by specifying a number here. Useful, for example, if you only want to output your top 3 most liked articles.

limit="3"

type

By default, the {exp:likee:comments} tag outputs its results based on the number of likes. You can override this and output your results based on the number of dislikes with this parameter. The options are liked and disliked.

type="disliked"

only_current_user

By default, the {exp:likee:comments} tag outputs a list of everyone’s likes and dislikes. You can limit this to only the current user by setting only_current_user to true. If this value is set, it will first check to see if the current user is logged in and has any likes or dislikes associated. If the user is not logged in, it will then check to see if the user has anonymously (cookie) liked or disliked anything, and use that instead.

only_current_user="true"

Variables for {exp:likee:comments}

{count}

The count variable outputs the number of likes and dislikes for a given comment. If you did not set the type parameter, this will default to the number of likes. If you used the type parameter to override the default functionality to order by disliked, this will output the number of dislikes.

{opposite_count}

The opposite_count variable outputs the count of the opposite type from the count variable. For example, if the count variable is outputting the number of likes, the opposite_count variable will output the number of dislikes.

{entry_id}

The entry_id variable outputs the entry_id of liked or disliked comment.

{comment_id}

The comment_id variable outputs the comment_id of liked or disliked comment.

{name}

The name variable outputs the name associated with the liked or disliked comment.

{email}

The email variable outputs the email address associated with the liked or disliked comment.

{url}

The url variable outputs the url associated with the liked or disliked comment.

{location}

The location variable outputs the location associated with the liked or disliked comment.

{comment}

The comment variable outputs the comment itself.