Hey ho!
getContent(); bindet gewünschte PHP Datein ein, welche die oberen Einstellungen (template_dir, etc) übernehmen sollen. Wie mach ich das am besten ohne jedes mal das Template_dir neu zu setzen? Da es verschieden Templates gibt, kann ichs nicht in der Smarty.class.php anpassen.
PHP-Code:
// root/index.php
$Smarty = new Smarty();
// Der Kram soll global!
$Smarty->template_dir = realpath('templates/'._CURRENT_TEMPLATE_DIR_.'/templates/');
$Smarty->compile_dir = realpath('templates/'._CURRENT_TEMPLATE_DIR_.'/compile/');
$Smarty->cache_dir = realpath('templates/'._CURRENT_TEMPLATE_DIR_.'/cache/');
$Smarty->display('public/index/head.htm');
$Index->getContent();
$Smarty->display('public/index/foot.htm');

Kommentar