smarty in functions, called from different directories

From: Date: Wed, 07 Feb 2001 17:39:04 +0000
Subject: smarty in functions, called from different directories
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-84@lists.php.net to get a copy of this message
What is the best way to work around the following problem? : When you use Smarty from within a function defined in a global include file, and you call this function from different directories, it won't work (eg.: Failed opening './templates_c/template.tpl.php' for inclusion ...) Should I make the template directory static instead of relative in Smarty.class.php, and put all templates for the whole site in this directory (maybe out of the document tree)? Or inherit the Smarty class and adjust the $template_dir and $compile_dir (by using a static dir) and use this modified class only for this function? Are there any other idea's? I think I will go for the second option (inherit the class and modify) Joris

« previous php.smarty.general (#84) next »