Advertisement
krot

smarty tree ul li

Jan 24th, 2017
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. {function name=printList}
  2.     {foreach $items key=$key item=$item}
  3.     {if !$key}{break}{/if}
  4.     <li>{$key}
  5.             {if is_array($item)}
  6.             <ul>
  7.             {call name=printList items=$item}
  8.             </ul>
  9.             {else}{break}
  10.             {/if}
  11.     </li>
  12.     {/foreach}
  13. {/function}
  14. <ul class="tree">
  15. {call name=printList items=$ARTTree}
  16. </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement