default_template_handler_func

From: Date: Fri, 04 Apr 2003 02:52:52 +0000
Subject: default_template_handler_func
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9069@lists.php.net to get a copy of this message
Hello, I have been ignoring this for a long time, but since maybe someone has a solution, or we can create one: I run multiple sites off one smarty script. Smarty is located outside of the web dirs and included when run. (/usr/local/smarty) ie.. Server: /usr/local/smarty/ /plugins /templates Clients: /var/www/html/site1 index.php calls smarty /templates /template_c /config /var/www/html/site2 index.php calls smarty etc... And my functionality is that each client can have their own templates, but if a template is called, and it doesn't exist in their own directory I then I will use on from my 'server' side: Define ("default_template_dir", "/usr/local/smarty/templates/"); $smarty->default_template_handler_func = "displayTemplate"; function displayTemplate($resource_type, $resource_name, $template_source, $template_timestamp, $this) { $tpl = default_template_dir .$resource_name; $this->display($tpl,cache_id); } This works.. but I get : Warning: Smarty error: unable to read template resource: "breadcrumbpath.tpl" in /usr/local/smarty/Smarty.class.php on line 1040 For every templates included like this... now it seems wrong... but I forged ahead and have altered every new release of Smarty.class.php to fix this: By changing QUIET=TRUE in the smarty.class.php, function _fetch_template_info the warnings go away. However, this all seems very wrong.. so can someone let me know what I am doing wrong, or can we change smarty so that I can leave smarty.class alone? Thanks, Aaron Judd

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