[solved] Strange behaviour of {menu}

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"
Post Reply
Mamphil
Forum Members
Forum Members
Posts: 14
Joined: Wed Feb 22, 2006 12:41 pm

[solved] Strange behaviour of {menu}

Post by Mamphil »

Hi,

because I guess I will get some more answers here, I post my problems with {menu} here, too. (Original post: http://forum.cmsmadesimple.org/index.ph ... l#msg52084)

I would like to add a new menu block to my website. The blocks currently used are inserted with

Code: Select all

{menu template='gc_linksnav' collapse="1" start_element="1.1" show_root_siblings="1" number_of_levels="3"}
.
Therefore I thought it would be sufficient to add a new section header and the content pages below. Since the first page of the new section header has got ID 5.1 I thought I could insert this section to my template using

Code: Select all

{menu template='gc_linksnav' collapse="1" start_element="5.1" show_root_siblings="1" number_of_levels="3"}
But this does not work :(

During try and error testing I tried to add

Code: Select all

{menu}
only. I thought the complete menu should have been displayed. I was really astonished when it displayed just one section which was not shown in the remaining {menu...}-parts. Strangely the newly added section was not displayed at all (the content pages and the section header were activated).

I would be really happy if you could help me,
Thanks in advance!
Mamphil
Last edited by Mamphil on Wed Feb 28, 2007 2:52 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Strange behaviour of {menu}

Post by RonnyK »

Mamphil,

are they "active" AND "Show in menu"? Both can be set on the options-tab of a content-page. The first one makes the page visible on the net, while the second one makes it visible in the menu.

Ronny
Mamphil
Forum Members
Forum Members
Posts: 14
Joined: Wed Feb 22, 2006 12:41 pm

Re: Strange behaviour of {menu}

Post by Mamphil »

Hi Ronny,

thank you for your answer.

Of course it was not shown in the menu b/c "Show in menu" was not activated. With "Show in menu" activated the part is displayed when calling "{menu}".

Unfortunately this does still not work - even if your improvement:

Code: Select all

{menu template='gc_linksnav' collapse="1" start_element="5.1" show_root_siblings="1" number_of_levels="3"}
I just checked: The other Section Headers were not "shown in menu", therefore this should not matter with the display of sub menus when all child elements are "shown in menu"...

Mamphil

PS: Even if your answer does not help with the problem, it explains the behaviour of "{menu}". It is logical that {menu} displays only those entries which are supposed to be shown in menu  ::) Thanks again!
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Strange behaviour of {menu}

Post by RonnyK »

Mamphil,

I use the active and not shown in menu's for pages I use for re-directing, so pages that show the results of the search (resultpage) or the "thank you"-page after sending a mail using the contact-form. You don't want them visible in the menu, but they need to be active or you'll end up with the 404-error.

By the way what is not working, if I put the line of code in my template, I'll end up with my level 5 as starting point. Only with the standard tpl,

Code: Select all

{menu template='cssmenu.tpl' collapse="1" start_element="5.1" show_root_siblings="1" number_of_levels="3"}
Ronny
Last edited by RonnyK on Wed Feb 28, 2007 12:34 pm, edited 1 time in total.
Mamphil
Forum Members
Forum Members
Posts: 14
Joined: Wed Feb 22, 2006 12:41 pm

Re: Strange behaviour of {menu}

Post by Mamphil »

Hi and thank you very much, you saved my day!

I don't know why, but the guy who created the menu template did say {if $count > 1} instead of {if $count > 0} at the very beginning - consequently menus with only one entry were not displayed...

Thanks again,
Mamphil
Post Reply

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