Involver Developer Network : content_like
This page last changed on Oct 18, 2011 by jed.wheeler@involver.com.
Notes This tag is intended for casual "Liking" and should NOT be used as part of a voting mechanism for anything with high security requirements like a contest. There are ways to get multiple "Likes" per user registered, though they are not easy. It is extremely effective for normal "Like" use, but is inappropriate if there are security concerns. If you want to do something with higher security, use the contest infrastructure. Attributes
ExamplesBelow is an example of adding liking around each tweet item of a Twittter Feed feature block.<div class="twitter-box"> <h2>Tweets from Involver, Follow us<br /> @<a href="http://www.twitter.com/involver">Involver</a></h2> {% twitter_feed %} {% paginate twitter_feed.tweets per_page:5 %} {% for story in tweets %} <div class="tweet"> <h3>{{ story.title | twitter_link | auto_link }}</h3> <p>{{ story.published_relative_time }}</p> </div> {% endfor %} {% endpaginate %} {% endtwitter_feed %} </div> Will output: Now let's add in the {% content_like %} tag:<div class="twitter-box"> <h2>Tweets from Involver, Follow us<br> @<a href="http://www.twitter.com/involver">Involver</a></h2> {% twitter_feed %} {% paginate twitter_feed.tweets per_page:5 %} {% for story in tweets %} <div class="tweet"> <h3>{{ story.title | twitter_link | auto_link }}</h3> <p> {{ story.published_relative_time }} - {% content_like story %} </p> </div> {% endfor %} {% endpaginate %} {% endtwitter_feed %} </div> Save and reload the tab and you'll now see the Like links:
FAQ
{% content_like [item] success_callback:"(function(){ return function(resp){ console.log(resp) }})()" %}
Related Topics![]() ![]() ![]() |
![]() |
Document generated by Confluence on Feb 12, 2013 09:09 |