Re: [SMARTY] smarty compiled files - standalone?

From: Date: Fri, 10 Jan 2003 13:02:54 +0000
Subject: Re: [SMARTY] smarty compiled files - standalone?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7113@lists.php.net to get a copy of this message
On Fri, Jan 10, 2003 at 01:34:58PM +0100, Peter Turcan wrote: > Hi to all > > Is it some way to use compiled templates standalone? > I mean, that if there is way to distribute only compiled templates and use > them as standalone PHP scripts. I don't think so, the templates rely heaviliy on a smarty-object they are included in. every templates stats with something like <?php $this->_load_plugins()... so $this has to be present. {assign var="foo" value="10"} is compiled to <?php echo $this->_plugins['function']['assign'][0](array('var' => "foo",'value' => "10"), $this) ; ?> so your dummy class needs a _load_plugins() function (method) that initialises all your plugins. i don't know if sections et al. need even more functions present. also the plugins themselves may call methods of the smarty-object, that may not be present in your stand-alone-smarty-class. what would this be good for anyway? regards messju > thank you. > Peter > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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