Related Content
Related Content
The instructions in this guide will teach you how to display content related to a category, showing the title and preview text.
Please note: Related content in Neto requires a relation on both sides of the pages. So if you want "Page A" to appear as related content on "Page B", make sure that in the Related content section in the Neto control panel, "Page A" has "Page B" in this section, and "Page B" has "Page A".
Wireframe
Coding Instruction
Step 1) Add related content to your category pages. Navigate to Products > Product Categories and open the category you wish to add related content to. Then, navigate to the Related Categories section, and add the page you want to appear using the drop down boxes.
Step 2) Using your SFTP login navigate to the following template /assets/themes/THEME-NAME/templates/cms/category.template.html
. Within the template, navigate down to the closing [%/THUMB_LIST%]
and paste the below code just after the closed tag.
[%list type:'content' filter:'related_content=[@content_id@]' limit:'99'%]
[%param *header%]
<h3>[@total_items@] Related Content Found</h3>
[%/param%]
[%param *body%]
<div class="row">
<div class="col-xs-12 col-sm-3">
<a href="[@url@]"><img class="img-responsive" src="[%asset_url type:'content' id:'[@content_id@]' default:'//cdn.neto.com.au/assets/neto-cdn/images/default_product.gif'/%]"></a>
</div>
<div class="col-xs-12 col-sm-9">
<h4>[@content_name@]</h4>
<p>[@content_short_description1@]</p>
<p><a href="[@url@]">Read more</a></p>
</div>
</div>
[%/param%]
[%/list%]