[SOLVED] Logic for alternative content if menu empty
Posted: Tue Feb 08, 2011 3:35 am
I have a pretty typical page layout with navigation split into a horizontal nav for top level items and then a vertical nav in a sidebar for 2nd level items. My question is: is there some sort of if/else logic I can use to display alternative content in the sidebar for top level pages that don't have children? Either in the page template (if sidebar div is empty, insert this code..., or if {menu} returns nothing, insert this code...) or in the Menu Manager template (if no list items, insert this code...)
In the Menu Manager template I tried
{if $count > 0}
...menu code
{else}
...my alternative code
{/if}
but it didn't work. Maybe someone has done this before, or can see where I'm going wrong. Thanks.
In the Menu Manager template I tried
{if $count > 0}
...menu code
{else}
...my alternative code
{/if}
but it didn't work. Maybe someone has done this before, or can see where I'm going wrong. Thanks.