Re: [SMARTY-DEV] Re: Var Templates

From: Date: Wed, 16 Apr 2003 13:34:56 +0000
Subject: Re: [SMARTY-DEV] Re: Var Templates
References: 1 2 3  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1194@lists.php.net to get a copy of this message
I like the idea of using a custom resource to handle these kinds of feature requests, keeping it out of the core. Example: {config_load file="eval:my.conf" section="foo"} But, smarty does not (yet) support custom resources on config files, only templates. This is something I've been wanting to work on for some time but it is low priority. With this, other nifty things could be done like supporting other config file formats, or even writing back to them: {config_load file="ini:my.conf"} That could be a custom resource to load php.ini formatted files. Monte On Tue, 2003-04-15 at 21:01, Tom Sommer wrote: > On Tue, 15 Apr 2003 16:09:22 -0700 (PDT), Boots wrote: > > > Hi all. > > > FWIW, I've been casually following the long discussion on backticks and > > automatically expanding vars as if they were themselves templates. I > > think it was Tom Sommer who initiated that discussion, but if not, he > > certainly has put a lot of interesting details on the table. > > I think you misunderstood my request... The feature I am requesting would > only be part of the parser, and only needed to be run once. > > basically I am looking for the *possibility* of extending backtrics... so > that it would do the following to config vars > var1 = "hello $myvar, welcome" > with (in compiled templates) > var1 = "hello ". $this->_tpl_vars['myvar'] .", welcome" > > I of cause realize your concern goes beyond my little request here, and I > share it very much... Like I don't need ANYTHING that relates to using > objects, resources or cache... but it's still in smarty, and if you removed > it, you would likely end up with a higher performance... yet I don't > complain... :) > > I need this extension I referred to earlier, and I think that in the long > run, you will need it too... besides, my example CAN'T possibly take up > that much performance... It's a matter of extending a regexp with a few > chars... I think... > > > -- > Tom Sommer, Denmark > www.tsn.dk - www.dreamcoder.dk -- Monte Ohrt <monte@ispi.net>

« previous php.smarty.dev (#1194) next »