Re: Html_Menu with Smarty Template ?

From: Date: Mon, 24 May 2004 13:15:02 +0000
Subject: Re: Html_Menu with Smarty Template ?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12701@lists.php.net to get a copy of this message
I use HTML_Treemenu with smarty and ran into the same type of problem. There are two solutions. You can capture the output of the method call using output buffering: ob_start (); $treeMenu->printMenu(); $tree = ob_get_contents (); ob_clean(); $smarty->assign_by_ref('tree_output', $tree); or you can assign the object itself and call the method in your template: $smarty->assign('tree', $tree); ... {$tree->printMenu()) Scott Mattocks Pete wrote:
Hi, can the Class Html_Menu be used together with the Smarty Template ? I can not pass the created nested set menu table to the Smarty Class. It is printed right away at the top of the page. Could anybody please help ? $menu->setMenuType('urhere'); $smarty->assign('menu', $menu->show()); Thank you very much!!


« previous php.pear.general (#12701) next »