Channel Ratings Documentation

Like - My Likes Tag

{exp:channel_ratings:likes}

Parameters

Parameter Description
like_author_id Like Author or the current user. Example: like_author_id=”CURRENT_USER”
type Which type of items? entry = Channel Entries, comment_review = Comment Reviews (ratings attached to an comment) comment_entry Channel Comments (ratings on individual comments) member Site Members channel_images Channel Images (ratings on the individual images) channel_files Channel Files (ratings on the individual files) channel_videos Channel Videos (ratings on the individual videos) br_product BrilliantRetail (ratings on the individual products)
entry_id OPTIONAL: For Channel Entries
url_title OPTIONAL: For Channel Entries
comment_id OPTIONAL: For Individual Comments
member_id OPTIONAL: For Site Members
ci_id OPTIONAL: For Channel Images
cf_id OPTIONAL: For Channel Files
cv_id OPTIONAL: For Channel Videos
br_id OPTIONAL: For BrilliantRetail Products
collection A specific ratign collection. Default is "default".
limit This parameter limits the number of items on any given page. The limit will default to 30 entries if a value is not specified.
prefix This parameter allows you to change the default variable prefix used. This is especially useful when you are nesting tags to avoid variable collisions. Default is "rating"

Variables

Variable Description
{rating:count} Current loop count
{rating:total} Total amount of items
{rating:item_id} Item ID
{rating:entry_id} Entry ID
{rating:channel_id} Channel ID
{rating:liked} Like Status
{rating:disliked} Disliked Status
{rating:date} Like Date
{rating:type} Like Type
{rating:delete_url} URL to delete the like/dislike

Conditionals

Conditional Description
{if rating:no_likes} This tag will conditionally display the code inside the tag if there are no items to display.

Example

1
2
3
4
5
6
7
8
9
10
{exp:channel_ratings:my_likes like_author_id="CURRENT_USER" type="entry"}
 
        {exp:channel:entries entry_id="{rating:entry_id}" dynamic="off"}
                <h3>{title}</h3>
                <p>{if "{rating:liked}"}You Liked this article{/if}</p>
                <a href="{rating:delete_url}">Delete</a>
                {if rating:no_likes}<p>You have not liked any entries</p>{/if}
        {/exp:channel:entries}
 
{/exp:channel_ratings:my_likes}

Support

Having problems setting up and/or using Channel Ratings? Support is offered from 10am to 4pm EST weekdays. Send us an email at help@eeharbor.com and we will respond as quickly as we can.