Thank you both for your help. This works fine for the breadcrumb.
My next issue in this case is the tree menu. I want to show only the content of the support folder and it’s subfolders there.
<?php if(!isset($subpages)) $subpages = $site->children() ?> <ul> <?php foreach($subpages->visible() AS $p): ?> <li class="depth-<?php echo $p->depth() ?>"> <!-- My try starts here --> <?php if (!$page->find('support')): ?> <?php echo $subpages->visible() ?> <?php endif ?> <!-- My try ends here --> <a<?php e($p->isActive(), ' class="active"') ?> href="<?php echo $p->url() ?>"><?php echo $p->title()->html() ?></a> <?php if($p->hasChildren()): ?> <?php snippet('treemenu_knowledge', array('subpages' => $p->children())) ?> <?php endif ?> </li> <?php endforeach ?> </ul>
As you can see, I try to filter by the keyword ‘support’ to get rid of the not needed folders. But still fails.
<?php if (!$page->find('**support**')): ?> <?php echo $subpages->visible() ?> <?php endif ?>
The idea is the same. Use everything in the support folder, nothing else.
My first try was to use the ‘$p’. Doesn’t work. I tried a lot, saw the recursive usage, but not able to hook in.
What I’m doing wrong here?
I know, that the nesting of the’ if/endif’ will be corrected later on.