swarfega

menu

Mar 23rd, 2013
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. {if $count > 0}
  2. <ul class="menu_horiz">
  3. {foreach from=$nodelist item=node}
  4. {if $node->depth != $node->prevdepth}
  5. {if $node->depth > $node->prevdepth}
  6. <ul class="mainmenuul">
  7. {elseif $node->depth < $node->prevdepth}
  8. </li></ul>
  9. {/if}
  10. {elseif $node->index > 0}
  11. </li>
  12. {/if}
  13.  
  14. {if $node->index == 0}
  15. {assign var="icon" value="house"}
  16. {elseif $node->haschildren == true }
  17. {assign var="icon" value="folder"}
  18. {elseif $node->haschildren == false }
  19. {assign var="icon" value="page"}
  20. {/if}
  21. {if $node->current == true}
  22. <li style="list-style-image: url('images/icons/{$icon}_go.png');">
  23. {else}
  24. <li style="list-style-image: url('images/icons/{$icon}.png');">
  25. {/if}
  26. {if $node->type == 'sectionheader'}
  27. <span class="sectionheader{$node->depth}">{$node->menutext}</span>
  28. {else}
  29. <a href="{if $node->id == 15}/{else}{$node->url}{/if}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>
  30. {/if}
  31. {/foreach}
  32. {repeat string="</li></ul>" times=$node->depth-1} </li>
  33. </ul>
  34. {/if}
Advertisement
Add Comment
Please, Sign In to add comment