previousRésumé de la classe HTML_Menu_DirectRenderer (Previous) (Next) DirectRenderer::setMenuTemplate()next

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

DirectRenderer::setEntryTemplate()

DirectRenderer::setEntryTemplate() – Définit le template pour l'entrée du menu

Synopsis

require_once 'HTML/Menu/DirectRenderer.php';

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

Description

Le template doit contenir au moins un marqueur {title}, qui peut également contenir un marqueur {url} et {indent} en fonction du type d'entrée. Les templates par défaut sont :

<?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

soit un type (une constante parmis les constantes HTML_MENU_ENTRY_*) ou un tableaudu type : 'type' => 'template'

string $template

template pour ce type d'entrée si $type n'est pas un tableau

Throws

No exceptions thrown.

Note

This function can not be called statically.

previousRésumé de la classe HTML_Menu_DirectRenderer (Previous) (Next) DirectRenderer::setMenuTemplate()next

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.