Re: HTML_Menu

From: Date: Sun, 04 Jan 2004 09:52:17 +0000
Subject: Re: HTML_Menu
References: 1 2 3  Groups: php.pear.dev php.pear.general 
Request: Send a blank email to pear-dev+get-24737@lists.php.net to get a copy of this message
Hi! This is more appropriate for pear-general list, Cc:'ing there. Aidan Lister wrote:
As for helping out, I'm still struggling with trying to use the default renderer to customise output (if you could throw me a quick example, I'm sure I could work out the others).
OK, here's the quick one: <?php require_once 'HTML/Menu.php'; require_once 'HTML/Menu/DirectRenderer.php'; $data = ... lots of stuff, take from existing usage example ...; $menu =& new HTML_Menu($data); $renderer =& new HTML_Menu_DirectRenderer(); $renderer->setEntryTemplate(array(
    HTML_MENU_ENTRY_ACTIVE      => "\t<td>\n\t\t{indent}<font size=\"+2\" color=\"red\">{title}</font>\n\t</td>\n",
    HTML_MENU_ENTRY_ACTIVEPATH  => "\t<td>\n\t\t{indent}<font size=\"+2\"><a href=\"{url}\">{title}</a></font>\n\t</td>\n"
)); $menu->render($renderer, 'tree'); echo $renderer->toHtml(); ?>
And could you explain what a "Unit test" is?
http://pear.php.net/manual/en/packages.php.phpunit.intro.php

« previous php.pear.dev (#24737) next »