Binders: menu

TODO:

 

/**
 * Smarty plugin: menu
 * 
 * Binds menu data to a template
 *
 * @param {array} $params 
 *            $params['page_id'] 
 *            $params['menu_id']
 *            $params['assign_to'] Variable within the template engine to which the content has to be assigned. 
 *
 * 
 * @example
 * 
 * # EXAMPLE 
 * 
 * {menu menu_id="home" assign_to="menu" page_id="85"}
 * <ul>
 * 	<h2>My Menu</h2>
 * 	{foreach $menu as $item}
 * 		<li>
 * 			<a href="{$item.url}">{$item.title}</a>
 * 		</li>
 *  {/foreach}
 * </ul>
 *
 * 
 * @see http://www.smarty.net/docs/en/plugins.functions.tpl
 *
 */

 

Leave a Reply

Your email address will not be published. Required fields are marked *