function afficher($name) { //Gestion du cache $this->page = $name; $fileName = $name . '.tpl'; ob_start(); $this->template_dir = Site::racine() . $this->templateDir . $this->templateName; $this->compile_dir = Site::racine() . $this->templateDir . $this->templateName . '/c/'; if (defined('TPL_TITLE')) { $this->setVar('titre', TPL_TITLE); } else { $this->setVar('titre', ''); } //Definition de variables generiques $this->setVar('pageName', $fileName); // Modifier ici (et dans le template) pour definir le titre. // ... Ou bien dans AddTemplateCustomVars() $this->setMetas(); $this->setCssDir(); $this->setFavicon(); $this->setRacine(); $this->setExecTime(); $this->setPub(); $this->setFil(); $this->setVar('racine', $this->getPref()); $this->setVar('site_short_name', Config::getSiteShortName()); // Variables personnalisees, pour l'utilisateur AddTemplateCustomVars($this, false); if ($this->cacheId != '') { $this->display('page.tpl', $this->cacheId); } else { $this->display('page.tpl'); } ob_end_flush(); }