Mercurial > defr > templates
changeset 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 | 673d9845fc16 |
children | 51645aad97a8 |
files | menu.php menu.xml |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/menu.php Mon Oct 22 08:59:58 2007 +0200 +++ b/menu.php Mon Oct 22 10:07:42 2007 +0200 @@ -3,12 +3,10 @@ $tpl = new Template('menu.xml'); $params = array( '#monMenu' => array( - array('dt' => 'Test1'), - array('dd' => 'Truc1'), - array('dt' => 'Test2'), - array('dd' => 'Truc2') + array('wrapper@dt' => 'Test1', 'wrapper@dd' => 'Truc1'), + array('wrapper@dt' => 'Test2', 'wrapper@dd' => 'Truc2') ) ); $tpl->setParams($params); echo $tpl; -?> \ No newline at end of file +?>
--- a/menu.xml Mon Oct 22 08:59:58 2007 +0200 +++ b/menu.xml Mon Oct 22 10:07:42 2007 +0200 @@ -1,8 +1,10 @@ <dl t:id='monMenu' xmlns='http://www.w3.org/1999/xhtml' xmlns:t='http://defr.net/2007/template'> - <dd t:toClone='true' /> - <dt t:toClone='true' /> + <wrapper t:toClone='true'> + <dt /> + <dd /> + </wrapper> <t:test t:toClone='true'> <t:a /> <t:b /> </t:test> -</dl> \ No newline at end of file +</dl>