Page 1 of 1

Снова МЕНЮ

Posted: Tue Feb 01, 2011 1:25 pm
by al77
Всем привет.
Очень прошу помощи по созданию шаблона меню.
код html

Code: Select all

      <div id="container">
        <div id="mainmenu">
          <ul>
            <li><a class="current a" href="http://www.free-css.com/">&nbsp;Home&nbsp;</a></li>
            <li><a href="subpage.html" class="a">About Us</a></li>
            <li><a href="http://www.free-css.com/" class="a">Rentals</a></li>
            <li><a href="http://www.free-css.com/" class="a">Moving</a></li>
            <li><a href="http://www.free-css.com/" class="a">Contact Us</a></li>
          </ul>
        </div>
      </div>
    </div>
пытался создать на основе стандартного, но к сожалению не проходит не активный класс class='a'
Активная страница - все норм, а вот не активная...
шаблон меню:

Code: Select all

{* 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 *} 

{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}
<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->parent == true or $node->current == true}
  {assign var='classes' value='current a'}
  {if $node->parent == true}
    {assign var='classes' value='.a'}
  {/if}
  {if $node->children_exist == true and $node->depth < $number_of_levels}
    {assign var='classes' value=$classes|cat:' parent'}
  {/if}
  <li><a class="{$classes}" href="{$node->url}">{$node->menutext}</a>

{elseif $node->children_exist == true and $node->depth < $number_of_levels and $node->type != 'sectionheader' and $node->type != 'separator'}
<li><a class="current a" href="{$node->url}">{$node->menutext}</a>

{elseif $node->current == true}
<li>{$node->menutext}

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

{elseif $node->type == 'separator'}
<li> <hr />

{else}
<li><a href="{$node->url}">{$node->menutext}</a>

{/if}

{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}