view menu.php @ 17:d4ac7cef0cdd

Recherche du fichier de template dans le path. Cela permet de définir proprement un include_path en début de script, et de ne préciser que le nom du fichier template en paramètre du constructeur.
author Franck Deroche <webmaster@defr.org>
date Wed, 24 Oct 2007 20:49:32 +0200
parents 54b0a41e5564
children
line wrap: on
line source
<?php
    require 'class.template.php';
    $tpl = new Template('menu.xml');
    $params = array(
        '#monMenu' => array(
            array('wrapper@dt' => 'Test1', 'wrapper@dd' => 'Truc1'),
            array('wrapper@dt' => 'Test2', 'wrapper@dd' => 'Truc2')
        )
    );
    $tpl->setParams($params);
    echo $tpl;
?>