Page 1 of 1

[Solved] Duplicate Section Headers on CSS Nav

Posted: Thu Jul 10, 2008 7:14 pm
by baldguy
I apologize if this has been answered elsewhere.  I have searched, but could find nothing.

In cmsms 1.3.1, I am using the CSS Left Nav menu option. When I assign a section header, it appears on the menu twice in the same line like this:

item 1
item 2
section header>section header
item 3
item 4

This only happens on the CSS menu, not the Simple Navigation (it appears only once there).

This is the code for the page:

Code: Select all

<li class="sectionheader"><span> section header </span>><dfn>5: </dfn>section header</a>
My only workaround so far is to set the span tag to display:none, but I still get the >.

Is there a solution for this?  ???

Re: Duplicate Section Headers on CSS Nav

Posted: Thu Jul 10, 2008 7:54 pm
by Dr.CSS
Did you make a new menu template?...

If not you need to go to the second tab in menu manager and import it out of the File Templates, naming it then you can remove the red stuff below...

section header >5: section header

And remove the last > from it that is why when you "set the span tag to display:none" it still shows up, it is in there like text...

Re: Duplicate Section Headers on CSS Nav

Posted: Thu Jul 10, 2008 8:13 pm
by baldguy
Great!  Thanks for your help!

Just so I've got it:

I import to the database the file cssmenu.tpl, renaming it to mycssmenu.tpl (which I then add to the template file where I call the menu).  I then edit this code (lines 25-36):

{elseif $node->type == 'sectionheader'}
        {$node->menutext}
{elseif $node->type == 'separator'}
       
{else}
type != 'sectionheader' and $node->type != 'separator'}
href="{$node->url}" {if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}{if $node->titleattribute != ''}title="{$node->titleattribute}"{/if}{if $node->target ne ""} target="{$node->target}"{/if}>{$node->hierarchy}: {$node->menutext}
{elseif $node->type == 'sectionheader'}
>{$node->hierarchy}: {$node->menutext}
{/if}

... removing the red parts.

And I can edit this new menu template to my heart's content!  ;D

Is that right?

Re: Duplicate Section Headers on CSS Nav

Posted: Thu Jul 10, 2008 9:16 pm
by Dr.CSS
Yes but you don't need to add the .tpl and in the menu tag it is just the name you called it w/o .tpl that is only used if you call a DB menu template like cssmenu.tpl...

Have fun, I've made 50 or more on one site...

Re: Duplicate Section Headers on CSS Nav

Posted: Thu Jul 10, 2008 9:23 pm
by baldguy
Sweet!!  :D

I feel like another door has been unlocked!

Thanks for your help and the speed of your replies, Mark!