Hi guys, I must've walked into a tree because I cannot for the life of me figure out how to check IF the current page has any related pages before cycling through them (So that it has div wrapping around it IF there are related pages, before then outputting them).
This is the block of code where I list a posts related tags, but I want an if statement checking first if there are any tags to list, before showing the <div class="tags">.
Any help with my derp would be great! Thanks
EDIT: For clarification - the relation is defined as "<cms:editable name='tags' type='relation' masterpage='tag.php' label='Tags' />" within this template. (We're on the page-view here).
- Code: Select all
<cms:pages id=k_page_id>
<div class="tags">
<cms:related_pages 'tags' >
<a href="<cms:show k_page_link />"<cms:show k_page_title /></a>
</cms:related_pages>
</div>
</cms:pages>
This is the block of code where I list a posts related tags, but I want an if statement checking first if there are any tags to list, before showing the <div class="tags">.
Any help with my derp would be great! Thanks

EDIT: For clarification - the relation is defined as "<cms:editable name='tags' type='relation' masterpage='tag.php' label='Tags' />" within this template. (We're on the page-view here).