Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {if !empty($menu)}
- <nav class="menu-left-wrap">
- <ul class="menu-left menu-default">
- {foreach from=$menu item=e key=k}
- {if $k > 0}
- {if $e._level > $prev_level}
- <ul>
- {else}
- </li>
- {section name="close_tags" start=`$e._level` loop=`$prev_level`}
- </ul>
- </li>
- {/section}
- {/if}
- {/if}
- {if $e._level==1}
- <li class="{if $e._right - $e._left > 1}has{/if}{if $e.menu_id==$page.menu_id && $e._left<=$page._left && $e._right>=$page._right} opened{/if}"><a href="{if $e.page_id==$site.page_id}/{else}{$e.url}{/if}"{if $e.blank} target="_blank"{/if}>{$e.name}</a>
- {else}
- <li class="{if $e._right - $e._left > 1}has{/if}{if $e.menu_id==$page.menu_id && $e._left<=$page._left && $e._right>=$page._right} opened{/if}"><a href="{if $e.page_id==$site.page_id}/{else}{$e.url}{/if}"{if $e.blank} target="_blank"{/if}>{$e.name}</a>
- {/if}
- {assign var="prev_level" value=`$e._level`}
- {/foreach}
- </li>
- </ul>
- {section name="close_tags" start=1 loop=`$prev_level`}
- </li>
- </ul>
- {/section}
- </nav>
- {/if}
Add Comment
Please, Sign In to add comment