Mercurial > defr > templates
comparison menu.php @ 14:54b0a41e5564
Menu un peu plus proche d'être fonctionnel.
Il y a de fortes chances qu'au final on obtienne un fonctionnement
se rapprochant de ça. Il faudrait toutefois pouvoir definir la
valeur de noeuds fils et pas d'attributs par contre a priori.
| author | Franck Deroche <webmaster@defr.org> |
|---|---|
| date | Mon, 22 Oct 2007 10:07:42 +0200 |
| parents | c86959030ae8 |
| children |
comparison
equal
deleted
inserted
replaced
| 13:673d9845fc16 | 14:54b0a41e5564 |
|---|---|
| 1 <?php | 1 <?php |
| 2 require 'class.template.php'; | 2 require 'class.template.php'; |
| 3 $tpl = new Template('menu.xml'); | 3 $tpl = new Template('menu.xml'); |
| 4 $params = array( | 4 $params = array( |
| 5 '#monMenu' => array( | 5 '#monMenu' => array( |
| 6 array('dt' => 'Test1'), | 6 array('wrapper@dt' => 'Test1', 'wrapper@dd' => 'Truc1'), |
| 7 array('dd' => 'Truc1'), | 7 array('wrapper@dt' => 'Test2', 'wrapper@dd' => 'Truc2') |
| 8 array('dt' => 'Test2'), | |
| 9 array('dd' => 'Truc2') | |
| 10 ) | 8 ) |
| 11 ); | 9 ); |
| 12 $tpl->setParams($params); | 10 $tpl->setParams($params); |
| 13 echo $tpl; | 11 echo $tpl; |
| 14 ?> | 12 ?> |
