Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17124 программиста и 1833 робота. Сейчас ищут 1675 программистов ...
Оглавление
Using Pyrus, the PEAR Installer for PHP 5.3+
PEAR Developer Guide
Channels: distributing your packages
PEAR Packages
DirectTreeRenderer::setEntryTemplate()
Вернуться к: HTML_Menu
DirectTreeRenderer::setEntryTemplate()
DirectTreeRenderer::setEntryTemplate() – Sets the template for menu entry.
Synopsis
require_once 'HTML/Menu/DirectTreeRenderer.php';
void HTML_Menu_DirectTreeRenderer::setEntryTemplate ( mixed $type , string $template = null )
The template should contain at least the {title} placeholder, can also contain {url} placeholder. Default templates are:
<?php
array(
HTML_MENU_ENTRY_INACTIVE => '<a href="{url}">{title}</a>',
HTML_MENU_ENTRY_ACTIVE => '<strong>{title}</strong>',
HTML_MENU_ENTRY_ACTIVEPATH => '<a href="{url}"><em>{title}</em></a>'
);
?>
If custom keys are present in the original menu structure, they will be assigned to the corresponding placeholders.
Parameter
- mixed $type
-
either type (one of HTML_MENU_ENTRY_* constants) or an array 'type' => 'template'
- string $template
-
template for this entry type if $type is not an array
Throws
throws no exceptions thrown
Note
This function can not be called statically.
Вернуться к: HTML_Menu