WebsiteBaker Support (2.8.x) > Templates, Menus & Design
ShowMenu2: Display root level page + child pages from any page
sky writer:
I'm sure you got this figured out by now, but if not, I worked out a simple solution:
--- Code: ---<?php show_menu2(0, 89, SM2_ALL, SM2_ALL,'<li><span class="menu-default">[ac][menu_title]</a></span>','</li>','<ul>','</ul>');?>
--- End code ---
The trick is, 89 is the id of an unused "hidden" (dummy) root parent page of "CDs". This way the child page "CDs" is shown, and then all children of the CDs page are shown as well.
Hope this helps.
CodeALot:
Thanks, I'll give that one a try too :)
sky writer:
Did that solution work for you?
CodeALot:
Unfortunately no. I ended up creating different menu-'numbers' for every pagetree and calling them using show_menu2(1 / show_menu2(2 / show_menu2(3 etc. etc.
For this project that worked well enough :)
sky writer:
Good enough. Maybe I did not understand your needs. The solution I posted does this:
--- Quote from: CodeALot on April 14, 2016, 02:33:55 PM ---
What I mean is that I want to have a pagetree/menu displaying:
CD's
* CD 1
* CD2
* CD3
on *any* page. So just the pagetree of CD's, including the top level.
--- End quote ---
In this example, the hidden root page is id3:
<?php show_menu2(0, 3, SM2_ALL, SM2_ALL,'<li><span class="menu-default">[ac][menu_title]</a></span>','</li>','<ul>','</ul>');?>
Is that not what you needed?
Navigation
[0] Message Index
[*] Previous page
Go to full version