I think I might be missing something obvious here so please let me know.
I want to create a side menu which shows the children of the current page. By itself that is easy: {menu childrenof=$page_alias} works fine.
The problem is when we get to a bottom level page, the menu is (naturally) blank. What we would like to do is show the menu from one level higher; the menu which contains the current page. We only want to do this when there are no children of the current page.
If anyone has a clue of how to begin on this please let me know.
Thanks,
Steve
Menu Manager question (SOLVED)
Menu Manager question (SOLVED)
Last edited by starbits on Thu Aug 11, 2011 8:04 pm, edited 1 time in total.
- kidcardboard
- Forum Members
- Posts: 54
- Joined: Mon Sep 28, 2009 5:25 pm
Re: Menu Manager question
Download and install CGSimpleSmarty and then use the following code.
Code: Select all
{capture assign='menu'}{menu childrenof=$page_alias}{/capture}
{if $menu != ''}
{$menu}
{else}
{menu childrenof=$cgsimple->get_parent_alias()}
{/if}
Re: Menu Manager question
Thanks kidcardboard! I knew there was an answer. Also thanks for the tip about CGsimplesmarty - I had installed before when it was required by other modules, but never used it for itself like this. I'm glad to know what it can do.
Steve

Steve