Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 23397 программистов и 1603 робота. Сейчас ищут 1800 программистов ...

DirectRenderer::setEntryTemplate()

Вернуться к: HTML_Menu

DirectRenderer::setEntryTemplate()

DirectRenderer::setEntryTemplate() – Sets the template for menu entry.

Synopsis

require_once 'HTML/Menu/DirectRenderer.php';

void HTML_Menu_DirectRenderer::setEntryTemplate ( mixed $type , string $template = null )

The template should contain at least the {title} placeholder, can also contain {url} and {indent} placeholders, depending on entry type. Default templates are:

<?php
array(
    
HTML_MENU_ENTRY_INACTIVE    => '<td>{indent}<a href="{url}">{title}</a></td>',
    
HTML_MENU_ENTRY_ACTIVE      => '<td>{indent}<b>{title}</b></td>',
    
HTML_MENU_ENTRY_ACTIVEPATH  => '<td>{indent}<b><a href="{url}">{title}</a></b></td>',
    
HTML_MENU_ENTRY_PREVIOUS    => '<td><a href="{url}">&lt;&lt; {title}</a></td>',
    
HTML_MENU_ENTRY_NEXT        => '<td><a href="{url}">{title} &gt;&gt;</a></td>',
    
HTML_MENU_ENTRY_UPPER       => '<td><a href="{url}">^ {title} ^</a></td>',
    
HTML_MENU_ENTRY_BREADCRUMB  => '<td><a href="{url}">{title}</a> &gt;&gt; </td>'
);
?>

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

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware