Global Variable Question
| From: | Avern Williams | Date: | Wed, 26 Jun 2002 09:59:23 +0000 |
| Subject: | Global Variable Question | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-5024@lists.php.net to get a copy of this message | ||
Hi,
All of my php files currently end something like this:
require_once("Smarty.class.php");
$smarty = new Smarty;
$smarty->assign("foo",$bar);
$smarty->display("site_template.tpl");
They all specify the same display template file (it's global template for the entire site). Is there a way for me to define this filename only 1 time in Smarty?
I don't think I can use a config file for this, because the config files set variables to be used by the templates, and I want the template name itself to be a variable. I've read through the information on global variables, but I'm not sure if they can solve this question.
I'd really appreciate any suggestions. Thanks,
Avern
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com