Sectionheader not clickable???

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
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Sectionheader not clickable???

Post 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...
User avatar
nakkiel
Forum Members
Forum Members
Posts: 70
Joined: Wed Apr 02, 2008 7:15 am

Re: Sectionheader not clickable???

Post 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
thoms
Forum Members
Forum Members
Posts: 84
Joined: Tue Dec 25, 2007 5:56 pm

Re: Sectionheader not clickable???

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Sectionheader not clickable???

Post by Dr.CSS »

Do you want it clickable or just want it to be able to show the children on a rollover?...
User avatar
nakkiel
Forum Members
Forum Members
Posts: 70
Joined: Wed Apr 02, 2008 7:15 am

Re: Sectionheader not clickable???

Post 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.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Sectionheader not clickable???

Post by Dr.CSS »

Post Reply

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