Page 1 of 1

(solved)Change Layout based on menu content

Posted: Mon Nov 03, 2008 11:06 am
by Foden
I'm preparing a site, where I have a top level menu bar. Some pages have sub menus that are should be shown in a sidebar.

So far it is working fine, but I want to remove the sidebar when there is no need for a sub menu.

It could be done with multiple templates, but I want to do it with one template, so site editors doesn't need to think about which template they are going to use.

So is there a way to determine if there is siblings to a given page, from within the main template (not the menu managers templates)?

Regards
Thomas

Re: (solved)Change Layout based on menu content

Posted: Mon Nov 03, 2008 12:05 pm
by Foden
Found CGSimpleSmarty module, that has the functions that I needed :)

{if cgsimple->has_children($page) == true}

something to do if there are children

{/if}

/ Thomas