Skip to content

Instantly share code, notes, and snippets.

@philcon93
Last active February 23, 2016 04:55
Show Gist options
  • Save philcon93/afb62493683751926191 to your computer and use it in GitHub Desktop.
Save philcon93/afb62493683751926191 to your computer and use it in GitHub Desktop.
Comments Thumb_list

Display comments from one page on another

B@se

Useful if users want user generated testimonials in the form of comments but also show those ’testimonials’ on the home page.

We just need to filter ([%filter_1%]) the content reviews to the id of the ’testimonials’ page:

[%thumb_list type:'content_reviews' limit:'5'%]
[%param filter_1%]294[%/param%]
[%param *header%]
<h3>Comments ([@reviews@])</h3>
[%/param%]
[%param *body%]
<div itemprop="review" itemscope itemtype="http://schema.org/Review">
<blockquote>
<h4 itemprop="name"><i>[%NOHTML%][@title@][%/NOHTML%]</i></h4>
<div>
<strong>[%if [@user:bill_first_name@]%]By: <span itemprop="author">[@user:bill_first_name@]</span> on [%/ if%]<meta itemprop="datePublished" content="[%FORMAT type:'date'%][@insert_date@][%/FORMAT%]">[%FORMAT type:'date'%][@insert_date@][%/FORMAT%]</strong>
</div>
<span itemprop="description">[%NOHTML%][@review@][%/NOHTML%]</span>
[%IF [@review_response@]%]
<br /><br />
<blockquote>
<span class="review_response text-muted"><strong><i>[@config:website_name@] Response</i></strong><br /> [%NOHTML%][@review_response@][%/NOHTML%]</span>
</blockquote>
[%/IF%]
</blockquote> <hr />
</div>
[%/param%]
[%/thumb_list%]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment