Du bist nicht angemeldet. Der Zugriff auf einige Boards wurde daher deaktiviert.
Seiten: 1
#1 16. März 2012 11:08
- PatriziaF
- kennt CMS/ms
- Ort: Altheim/Österreich
- Registriert: 19. Januar 2011
- Beiträge: 153
- Webseite
[GELÖST] sectionheader-elemente wird zu menuactive menuparent parent
Hallo liebe CMSmsler!
ich habe ein Problem mit einem Submenü dem ich nicht herr werde.
und zwar wird ein elternelement (eine abschnittsüberschrift) zum klickbaren elternelement - natürlich ohne link dahinter.
--> siehe http://www.fxgruber.at/impressionen/201 … ten-2.html
--> 2012 ist dann ein Link der als Inhalt "#" hat
das möchte ich natürlich nicht.
habt ihr Tipps & Tricks für mich wie ich das lösen kann?
Vielen Dank im Voraus!
LG Patrizia
PS: das ist der Code vom sub-menü
{* CSS classes used in this template:
#menuwrapper - The id for the <div> that the menu is wrapped in. Sets the width, background etc. for the menu.
#primary-nav - The id for the <ul>
.menuparent - The class for each <li> that has children.
.menuactive - The class for each <li> that is active or is a parent (on any level) of a child that is active. *}{assign var='number_of_levels' value=10000}
{if isset($menuparams.number_of_levels)}
{assign var='number_of_levels' value=$menuparams.number_of_levels}
{/if}{if $count > 0}
<div id="menuwrapper_sub">
<ul id="primary-nav_sub">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string='<ul class="unli">' 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->parent == true or $node->current == true}
{assign var='classes' value='menuactive'}
{if $node->parent == true}
{assign var='classes' value='menuactive menuparent'}
{/if}
{if $node->children_exist == true and $node->depth < $number_of_levels}
{assign var='classes' value=$classes|cat:' parent'}
{/if}
<li class="{$classes}"><a class="{$classes}"
{elseif $node->type == 'sectionheader' and $node->haschildren == true}
<li class="menuparent"><a class="menuparent"><span class="sectionheader">{$node->menutext}</span></a>
{elseif $node->type == 'sectionheader'}
<li><span class="sectionheader">{$node->menutext}</span>
{elseif $node->type == 'separator'}
<li style="list-style-type: none;"> <hr class="menu_separator" />
{elseif $node->children_exist == true and $node->depth < $number_of_levels and $node->type != 'sectionheader' and $node->type != 'separator'}
<li class="menuparent"><a class="menuparent"
{else}
<li>
<a
{/if}{if ($node->type != 'sectionheader' and $node->type != 'separator') or $node->parent == true or $node->current == true }
{if $node->target}target="{$node->target}" {/if}
href="{$node->url}"><span>{$node->menutext}</span></a>
{/if}
{/foreach}
{repeat string='</li></ul>' times=$node->depth-1}
</li>
</ul>
<div class="clearb"></div>
</div>
{/if}
Offline
#2 16. März 2012 11:55
- Klenkes
- Server-Pate
- Ort: 89428 Syrgenstein
- Registriert: 17. Dezember 2010
- Beiträge: 1.437
Re: [GELÖST] sectionheader-elemente wird zu menuactive menuparent parent
Am Besten den leeren Link auf den Sectionheader raus nehmen:
{* CSS classes used in this template:
#menuwrapper - The id for the <div> that the menu is wrapped in. Sets the width, background etc. for the menu.
#primary-nav - The id for the <ul>
.menuparent - The class for each <li> that has children.
.menuactive - The class for each <li> that is active or is a parent (on any level) of a child that is active. *}{assign var='number_of_levels' value=10000}
{if isset($menuparams.number_of_levels)}
{assign var='number_of_levels' value=$menuparams.number_of_levels}
{/if}{if $count > 0}
<div id="menuwrapper_sub">
<ul id="primary-nav_sub">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string='<ul class="unli">' 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->parent == true or $node->current == true}
{assign var='classes' value='menuactive'}
{if $node->parent == true}
{assign var='classes' value='menuactive menuparent'}
{/if}
{if $node->children_exist == true and $node->depth < $number_of_levels}
{assign var='classes' value=$classes|cat:' parent'}
{/if}
<li class="{$classes}"><a class="{$classes}"
{elseif $node->type == 'sectionheader' and $node->haschildren == true}
<li class="menuparent"><a class="menuparent"><span class="sectionheader">{$node->menutext}</span></a>
{elseif $node->type == 'sectionheader'}
<li><span class="sectionheader">{$node->menutext}</span>
{elseif $node->type == 'separator'}
<li style="list-style-type: none;"> <hr class="menu_separator" />
{elseif $node->children_exist == true and $node->depth < $number_of_levels and $node->type != 'sectionheader' and $node->type != 'separator'}
<li class="menuparent"><a class="menuparent"
{else}
<li>
<a
{/if}{if ($node->type != 'sectionheader' and $node->type != 'separator') or $node->parent == true or $node->current == true }
{if $node->target}target="{$node->target}" {/if}
href="{$node->url}"><span>{$node->menutext}</span></a>
{/if}
{/foreach}
{repeat string='</li></ul>' times=$node->depth-1}
</li>
</ul>
<div class="clearb"></div>
</div>
{/if}
Offline
#3 16. März 2012 12:48
- PatriziaF
- kennt CMS/ms
- Ort: Altheim/Österreich
- Registriert: 19. Januar 2011
- Beiträge: 153
- Webseite
Re: [GELÖST] sectionheader-elemente wird zu menuactive menuparent parent
das hat leider gar nix gebracht.
sobald ich wieder auf der unterseite war, war auch 2012 wieder klickbar
Offline
#4 17. März 2012 10:19
- Klenkes
- Server-Pate
- Ort: 89428 Syrgenstein
- Registriert: 17. Dezember 2010
- Beiträge: 1.437
Re: [GELÖST] sectionheader-elemente wird zu menuactive menuparent parent
Wie die Fernsehköche "hab ich da mal was vorbereitet..."
Ich hab die beiden Zustände der Sectionheader markiert. Dort kannst du ja noch eigene Klassen vergeben, falls du sie speziell markieren willst.
Versuch's mal hiermit:
{* CSS classes used in this template:
#menuwrapper - The id for the <div> that the menu is wrapped in. Sets the width, background etc. for the menu.
#primary-nav - The id for the <ul>
.menuparent - The class for each <li> that has children.
.menuactive - The class for each <li> that is active or is a parent (on any level) of a child that is active. *}
{if $count > 0}
<ul id="primary-nav_sub">
{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->parent == true and $node->type == 'sectionheader'}{* +++ Aktiver Section-Parent +++ *}
<li class="menuparent">
{elseif $node->haschildren == true and $node->type == 'sectionheader'}{* +++ Nichtaktiver Section-Parent +++ *}
<li class="menuparent">
{elseif $node->parent == true or ($node->current == true and $node->haschildren == true)}
<li class="menuactive menuparent"><a class="menuactive menuparent"
{elseif $node->current == true}
<li class="menuactive"><a class="menuactive"
{elseif $node->haschildren == true}
<li class="menuparent"><a class="menuparent"
{elseif $node->type == 'separator'}
<li style="list-style-type: none;"><hr class="separator" />
{else}
<li><a
{/if}
{if $node->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}><span>{$node->menutext}</span></a>
{elseif $node->type == 'sectionheader'}
<span>{$node->menutext}</span>
{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
<div class="clearb"></div>
{/if}
Offline
#5 22. März 2012 14:50
- PatriziaF
- kennt CMS/ms
- Ort: Altheim/Österreich
- Registriert: 19. Januar 2011
- Beiträge: 153
- Webseite
Re: [GELÖST] sectionheader-elemente wird zu menuactive menuparent parent
perfekt - funktioniert!
DANKE!
Offline
Seiten: 1