I have been teaching myself couch through the tutorial, and i have arrived at a dilemma. In the tutorial you demonstrate how to automatically show the active link using this code.
Now i have tried and tried to make it dynamic for pages within the template. This is what i have:
Can someone please help. I am trying to populate a navigation with content from clonable pages within the index template.
- Code: Select all
<li><a href="<cms:link 'index.php' />" <cms:if k_template_name=='index.php'>class="active"</cms:if> >Home</a></li>
Now i have tried and tried to make it dynamic for pages within the template. This is what i have:
- Code: Select all
<cms:pages masterpage='index.php' limit='10' order='ASC' paginate='1'>
<li>
<a href="<cms:show k_page_link />" <cms:if k_page_name=='k_page_name' > class="active" </cms:if> > <cms:show k_page_name />
</a>
</li>
</cms:pages>
Can someone please help. I am trying to populate a navigation with content from clonable pages within the index template.