Небольшие проблемы с меню.
Posted: Thu Sep 06, 2012 1:25 pm
Добрый день! Прошу сразу меня извенить, если что то буду делать не так, первый раз работаю с этой системой да и вообще первый раз.
Проблема вот в чем:
Вот меню
{* CSS classes used in this template:
.activeparent - The top level parent when a child is the active/current page
li.active0n h3 - n is the depth/level of the node. To style the active page for each level separately. The active page is not clickable.
.clearfix - Used for the unclickable h3 to use the entire width of the li, just like the anchors. See the Tools stylesheet in the default CMSMS installation.
li.sectionheader h3 - To style section header
li.separator - To style the ruler for the separator *}
{repeat string="" times=$node->prevdepth-$node->depth}
{if $count > 0}
<ul class="menu collapsible">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul class=acitem>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul></li>" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
<li class="expand"><a class="main" href="{$node->url}"
{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}
{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}
{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}
>{$node->menutext}</a>
{elseif $node->haschildren == true }
<li><a class="main" href="{$node->url}"
{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}
{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}
{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}>
{$node->menutext}</a>
{elseif $node->current == true}
<li><a class="active" href="{$node->url}">{$node->menutext}</a></li>
{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}"</li>{/if}
{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}
{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}
{if $node->target != ''} target="{$node->target}"{/if}>
{$node->menutext}</a>
{/if}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
В результате этого отображается корректно только тот раздел меню у которого есть дочерняя страница. Когда нет дочерней страницы, css не подключается к разделу и он отображается не правильно.
Подскажите, пожалуйста, что подправить? Спасибо.
Проблема вот в чем:
Вот меню
{* CSS classes used in this template:
.activeparent - The top level parent when a child is the active/current page
li.active0n h3 - n is the depth/level of the node. To style the active page for each level separately. The active page is not clickable.
.clearfix - Used for the unclickable h3 to use the entire width of the li, just like the anchors. See the Tools stylesheet in the default CMSMS installation.
li.sectionheader h3 - To style section header
li.separator - To style the ruler for the separator *}
{repeat string="" times=$node->prevdepth-$node->depth}
{if $count > 0}
<ul class="menu collapsible">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul class=acitem>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul></li>" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
<li class="expand"><a class="main" href="{$node->url}"
{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}
{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}
{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}
>{$node->menutext}</a>
{elseif $node->haschildren == true }
<li><a class="main" href="{$node->url}"
{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}
{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}
{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}>
{$node->menutext}</a>
{elseif $node->current == true}
<li><a class="active" href="{$node->url}">{$node->menutext}</a></li>
{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}"</li>{/if}
{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}
{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}
{if $node->target != ''} target="{$node->target}"{/if}>
{$node->menutext}</a>
{/if}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
В результате этого отображается корректно только тот раздел меню у которого есть дочерняя страница. Когда нет дочерней страницы, css не подключается к разделу и он отображается не правильно.
Подскажите, пожалуйста, что подправить? Спасибо.