Re: [SMARTY] Getting the current template path

From: Date: Thu, 19 Jun 2003 16:02:55 +0000
Subject: Re: [SMARTY] Getting the current template path
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9737@lists.php.net to get a copy of this message
At 17:54 19.06.2003 +0200, you wrote:
Now that I have more than 100 templates i want to put them into separate folders inside the template dir. Some templates will be moved around so I don't want to hard-code the template paths into the include functions in the templates. I want something like {include file=$smarty.some_function_that_returns_path_of_current_template+"admin_ main.tpl"}
Hi Gabriel, why don't you create a config file for your site settings like file paths etc. and then load the config with load_config(). You can then use the config vars {#templates#} or the {$smarty.config...} syntax to reference them in your templates. Martin.

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