(solved)Change Layout based on menu content

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
Foden

(solved)Change Layout based on menu content

Post 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
Last edited by Foden on Mon Nov 03, 2008 12:03 pm, edited 1 time in total.
Foden

Re: (solved)Change Layout based on menu content

Post 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
Locked

Return to “Layout and Design (CSS & HTML)”