previousRésumé de la classe HTML_Menu_DirectTreeRenderer (Previous) (Next) DirectTreeRenderer::setItemTemplate()next

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

DirectTreeRenderer::setEntryTemplate()

DirectTreeRenderer::setEntryTemplate() – Définit le template pour une entrée du menu

Synopsis

require_once 'HTML/Menu/DirectTreeRenderer.php';

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

Description

Le template doit contenir au moins un marqueur {title}, qui peut également contenir un marqueur {url}. Les templates par défaut sont :

<?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>'
);
?>
Si des clés personnalisées sont présentes dans la structure originale du menu, elles seront assognées aux marqueurs correspondants.

Parameter

mixed $type

soit un type (une constante parmi les constantes HTML_MENU_ENTRY_*) ou un tableau du 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_DirectTreeRenderer (Previous) (Next) DirectTreeRenderer::setItemTemplate()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.