Re: Other directories and Smarty

From: Date: Thu, 22 Feb 2001 14:46:12 +0000
Subject: Re: Other directories and Smarty
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-190@lists.php.net to get a copy of this message
Or simply $common_one = new Smarty; $common_one->template_dir = '/common'; $common_one->compile_dir = '/common/compile'; > -----Original Message----- > From: Joris Trooster / Interstroom [mailto:trooster@interstroom.nl] > Sent: Friday, 23 February 2001 12:34 AM > To: smarty@lists.ispi.net > Subject: [smarty] Re: Other directories and Smarty > > > > 2. I would like to be able to share these tempaltes, via an include > > statement, but it will not work as I cannot point Smarty to use another > > template dir > > > You can inherit the Smarty class, and change the desired variables : > > class Common_Smarty extends Smarty { > var $template_dir = "/path/to/common/templates"; > var $compile_dir = "/path/to/common/templates_c"; > } > > Now use template = new Common_Smarty; for the common templates. > > Joris. > > > > --- > You are currently subscribed to smarty as: jimmy@harlindong.com > To unsubscribe send a blank email to $subst('Email.Unsub') > Visit Smarty's homepage at > http://www.phpinsider.com/php/code/Smarty/ > >

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