smarty template engine
Thursday, November 20, 2008  
download | documentation | faq | forum | mailing lists | changelog | contribs 


search for in the  


get_template_vars()

get_template_vars() -- Retourne la valeur assignée passée en paramètre

Description

array get_template_vars ( [string varname])

Si aucun paramètre n'est donné, un tableau de toutes les variables assignées est retourné.

Exemple 13-1. Exemple avec get_template_vars

<?php
// récupère la variable 'foo' assignée au template
// get assigned template var 'foo'
$myVar $smarty->get_template_vars('foo');

// récupère toutes les variables assignées a ce template
$all_tpl_vars $smarty->get_template_vars();

// les affiche a l'écran
print_r($all_tpl_vars);
?>

Voir aussi assign(), {assign}, append(), clear_assign(), clear_all_assign() et get_config_vars().




 

credits 

Smarty Copyright © 2002-2008
New Digital Group, Inc.

All rights reserved.