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

couch is driving me crazy. I can't get it to output the submenu of a specific menu-item.

I have a simple index.php which is setup as a cloneable, nested-page template. My menu hierarchy uses two levels. Now I'm trying to display the submenu of the first-level page with id=6 and name="schwerpunkte". I have verified that both id and name are correct. Whenever I try to fetch its children however, depending on what method I try, I either get all pages of the whole index.php, no pages at all, or the right amount of pages (number of subpages of this menu point) but no links and page-names. It's driving me nuts.

This is what I'm currently at, since I want to use this code on a different template which is masqueraded in the index.php:
Code: Select all
<ul>
<cms:nested_pages masterpage='index.php' childof='schwerpunkte' depth='1' >
   <li><a href="<cms:show k_page_link />"><cms:show k_page_title /></a></li>
</cms:nested_pages>
</ul>


I have tried using pages-tag as well but with frustrating results. What am I missing?

Thank you very much for your help and

kind regards,
madtrigger

Take the doc example as the inspiration —

Code: Select all
<cms:nested_pages masterpage='index.php'>
   <cms:dump />
   <a href="<cms:show k_nestedpage_link />"><cms:show k_nestedpage_title /></a><br />
</cms:nested_pages>


Here I merged it with your code —

Code: Select all
<ul>
<cms:nested_pages masterpage='index.php' childof='schwerpunkte' depth='1' >
   <li>
      <a href="<cms:show k_nestedpage_link />"><cms:show k_nestedpage_title /></a>
      <cms:dump />
   </li>
</cms:nested_pages>
</ul>
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate

Thank you so much! I might feel stupid now, but at least I know what I did wrong ;D
3 posts Page 1 of 1