Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi,

I'm currently using this following code to generate a menu list.
Code: Select all
<cms:nested_pages masterpage='pleasure-narrative.php' exclude='coming-soon' >
   <a href="<cms:show k_nestedpage_link />"><cms:show k_nestedpage_title /></a>
</cms:nested_pages>

Any idea how to exclude the current page from a nested pages list in addition to the one already stated.

Thanks
Sam
Hi,

As mentioned in the docs (https://docs.couchcms.com/tags-referenc ... pages.html) -
If multiple pages are to be excluded, separate their names using comma.

So to exclude the current page also, we can add its name (picked dynamically) separated by a comma as follows -
Code: Select all
<cms:nested_pages masterpage='pleasure-narrative.php' exclude="coming-soon, <cms:show k_page_name />" >
   <a href="<cms:show k_nestedpage_link />"><cms:show k_nestedpage_title /></a>
</cms:nested_pages>

Please note the use of 'double-quotes' while setting the 'exclude' parameter - it is needed because we are using Couch tags within the param's value.

Hope this helps.
2 posts Page 1 of 1
cron