Involver Developer Network : topic
This page last changed on May 25, 2011 by steve.hull@involver.com.
topicTopic that comes back from the Get Satisfaction API. Topics do not load initially with responses, but responses can be acquired from the sml.tag.GetSatisfaction Javascript library. Error handlingIf topics fail to load from the Get Satisfaction API, the entire {{ get_satisfaction.topics }} attribute will be the word "error" instead of an array. Attributes
Examples{% partial name: "topics" %} {% partial name: "topic" %} <div class="topic_wrapper"> <div class="topic"> {% if topic.author.facebook_id %} <fb:profile-pic uid="{{ topic.author.facebook_id }}" size="q" class="avatar-img"></fb:profile-pic> {% else %} <a href="{{ topic.author.at_sfn }}" class="avatar-img" ><img src="{{ topic.author.avatar }}" alt="{{ topic.author.name }}" /></a> {% endif %} <div class="entry {{ topic.style }}"> <p class="title">{{ topic.subject }}</p> <p id="topic_content_container_{{ topic.id }}" class="message"> {% if topic.content.size > 0 %} {{ topic.content }} {% endif %} </p> </div> <span id="{{ topic.id }}_me_too">{{ topic.me_too_count | pluralize: 'person has', 'people have' }}</span> this {{ topic.style }} · </div> </div> {% endpartial %} {% for topic in topics %} {% render partial: "topic" topic: topic %} {% endfor %} {% if topics.size == 0 %} <p><div align="center"><h1>No Topics found</h1></div></p> {% endif %} {% endpartial %} <div id="topics"> {% unless get_satisfaction.topics == "error" %} {% render partial:"topics" get_satisfaction:get_satisfaction style:'recent_activity' topics:get_satisfaction.topics %} {% else %} <p><div align="center"><h3>There was a problem retrieving the topics from this community. Please try hitting "Refresh" in your browser.</h3></div></p> {% endunless %} </div> |
![]() |
Document generated by Confluence on Feb 12, 2013 09:09 |