Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Menu arranged as such
- $menus = array(
- 'menu-id-1': (item1, item2, item3, item4....),
- 'menu-id-2': (.....)
- );
- Each menu item has a submenu ID that can be matched to the $menus array.
- Will this template generate the right menu hierarchy?
- {* Must use global menus variable to determine hierarchy. *}
- {function name=menu}
- <ul>
- {foreach $data as $m}
- <li>
- {$m}
- {if is_array($menus[$m@key])}
- {menu data=$menus[$m@key]}
- {/if}
- </li>
- {/foreach}
- </ul>
- {/function}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement