Re: DirectTreeRenderer methods syntax
| From: | John B Dougherty | Date: | Thu, 30 Oct 2008 22:07:45 +0000 |
| Subject: | Re: DirectTreeRenderer methods syntax | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-29390@lists.php.net to get a copy of this message | ||
>
> $renderer->setEntryTemplate('type','<a href="{url}"
>> class="{class}">{title}</a>');
>>
>
> This definitely looks like an error to me, you should pass one of
> HTML_MENU_ENTRY_... constants as a first parameter here.
>
> I'm not sure whether any placeholders at all will be replaced in templates
> passed in setItemTemplate(), stick to setEntryTemplate() unless you want to
> hack an existing renderer.
>
No need to hack an existing renderer!
this worked:
$renderer->setItemTemplate('<li ','</li>');
$renderer->setEntryTemplate(HTML_MENU_ENTRY_INACTIVE,'id="{id}"><a
href="{url}" class="{class}">{title}</a>');
thank you Alexey !!