Page 1 of 1

menu maneger

Posted: Sun Apr 22, 2012 9:23 pm
by papagot1
the menu almost works as it should quote the code immediately

Code: Select all

<div id="main">
  <ul class="container">
        <li class="menu">      
          <ul>
{if $count > 0}

{foreach from=$nodelist item=node}
{if $node->type == 'sectionheader'}
<li class="button"><a href="#" class="box1">{$node->menutext}</a></li>
{else}
{if $node->parent == true or $node->current == true}
{if $node->depth > $node->prevdepth}
<li class="dropdown1">
<ul>
{elseif  $node->depth < $node->prevdepth}
</li></ul>{/if} 
dropdown1<li><a href="{$node->url}" target="{$node->target}">{$node->menutext}</a></li>
{else}
{if $node->depth > $node->prevdepth}
<li class="dropdown">
<ul>
{elseif  $node->depth < $node->prevdepth}
</li></ul>{/if} 
dropdown<li><a href="{$node->url}" target="{$node->target}">{$node->menutext}</a></li>
{/if}{/if}
{/foreach}
{/if}
           </ul>          
      </li> 
        </ul>
</div>
That is such a sense if the subsidiary is the chosen element selects the main class as dropdown1 and if the chosen elementa leave no dropdown. the whole problem is if you choose the first element is working as you want if you select the second element in the list where the class MUST FACE BUT WRITES dropdown1 CLASS dropdown. Where I go wrong?