Re: [SMARTY] how do I get $config_dir to work?

From: Date: Sun, 09 Mar 2003 07:34:21 +0000
Subject: Re: [SMARTY] how do I get $config_dir to work?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8492@lists.php.net to get a copy of this message
On Sun, Mar 09, 2003 at 12:53:53AM -0500, poQa . wrote: > Hi everyone, > > This is my setup: > > - home > /configs > site.conf > - public_html > /templates > header.tpl > /templates_c > index.php > > When I call 'header.tpl' from index.php, I cannot use the $config_dir > variable: it returns null! I need a way to give 'header.tpl' this variable > because it needs to include it with {config_load file=...} > > So, basically, I'd like to do this: > > {config_load file=$config_dir."site.conf"} the "." for string concatenation is php not smarty. in the above statement, the '.' would be taken literally, thus doing: {config_load file=".site.conf"} did you try {config_load file="site.conf"} ? if your $config_dir is set correctly, site.conf should be found. if you really need $smarty->config_dir in your templates you can $smarty->assign_by_ref('config_dir', $smarty->config_dir); or $smarty->assign('config_dir', $smarty->config_dir); before display > Any other alternatives about this?? > > Thanks a lot, > > Ilir. > > _________________________________________________________________ > Help STOP SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- It is essential that implementations by different vendors interoperate.: Unsere proprietären Basteleien dokumentieren wir gar nicht erst. Sven Türpe

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