Re: [SMARTY] $template_dir prob
| From: | Ben Godfrey | Date: | Wed, 24 Jul 2002 20:50:07 +0000 |
| Subject: | Re: [SMARTY] $template_dir prob | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5434@lists.php.net to get a copy of this message | ||
You need to use the Smarty member variable:
$smarty = new Smarty();
$smarty->template_dir="../templates/admin";
Ben
On Wednesday, July 24, 2002, at 09:46 , Sean Chambers wrote:
You can't just set $template_dir. I just tell it the full path to the template: $full_template = "/some/dir/in/filesystem/index.tpl"; $tpl->display("file:$full_template", $cache_num); -----Original Message----- From: Christian Calloway [mailto:dcminds@yahoo.com] Sent: Wednesday, July 24, 2002 4:42 PM To: smarty-general@lists.php.net Subject: [SMARTY] $template_dir prob Ok ok, I've set $template_dir the beginning of my scripts to say: $template_dir="../templates/admin"; But smarty keeps attempting to find templates in the default "./templates" dir. I've even tried using the GLOBALS array to set the $template_dir variable: $GLOBALS['template_dir']=blahblah; Nothing's working. Any ideas? Thanks Chris -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php(q) Ben Godfrey? (a) Developer and Designer, See http://aftnn.org/ for details