Page 1 of 1

Sectionheader not clickable???

Posted: Sat Apr 26, 2008 4:56 pm
by jmansa
I want to create a vertical menu with sectionheaders and subpages, but am not able to make the sectionheaders clickable.

I want the sectionheaders to be clackable and fold out the menu items below, but don't know how???

Here is what I have done:

CSS (Only the sectionheader part)

Code: Select all

/* section header */
div#menu_vert li.sectionheader {
   border-right: none;
   font-size: 11px;
   padding: 5px 5px 5px 5px;
   line-height: 1em;
   margin: 0;
   text-transform:uppercase;
}
And this is the tpl I use:

Code: Select all

{if $count > 0}
<ul>
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}

{if $node->current == true}
<li class="currentpage"><h3><dfn>Current page is {$node->hierarchy}: </dfn>{$node->menutext}</h3>

{elseif $node->parent == true}
<li class="activeparent"><a class="activeparent" href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>

{elseif $node->type == 'sectionheader'}
<li class="sectionheader">{$node->menutext}

{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"> <hr />

{else}
<li><a 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 != ''} target="{$node->target}"{/if}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>

{/if}

{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
Hope somebody can clarify and help me...

Re: Sectionheader not clickable???

Posted: Tue Apr 29, 2008 7:42 am
by nakkiel
I'm not sure if this does the trick, but maybe you can change the 'section header' to 'link'? Then it's clickable, but don't know if it folds out... Maybe you could paste link to your site so I could better understand how did you want your menu to be, it's too much work to install new cmsms and paste your code to try it out ;D

Re: Sectionheader not clickable???

Posted: Tue Apr 29, 2008 11:43 am
by thoms
I want the sectionheaders to be clackable and fold out the menu items below, but don't know how???
It's the characteristic feature of a sectionheader NOT to be clickable and NOT change the menu.

What you want is exact what a normal menu on level 1 does, why do you use sectionsheaders?

Thomas

Re: Sectionheader not clickable???

Posted: Thu May 01, 2008 4:22 pm
by Dr.CSS
Do you want it clickable or just want it to be able to show the children on a rollover?...

Re: Sectionheader not clickable???

Posted: Thu May 29, 2008 10:06 am
by nakkiel
Now I know what you meant by this. I had the same problem this morning. You can make the section header into link, and put an url to it into the first page under that parent. I don't know how you could just make a menu that would show items under parent when clicked upon, but this is almost the same thing.

Re: Sectionheader not clickable???

Posted: Fri May 30, 2008 4:00 am
by Dr.CSS