Re: AW: [SMARTY] smarty variables used in {include...}

From: Date: Thu, 20 Feb 2003 14:52:08 +0000
Subject: Re: AW: [SMARTY] smarty variables used in {include...}
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8000@lists.php.net to get a copy of this message
curly brace syntax won't work. escaping won't work because some environments use "\" as a directory delimiter. Monte On Thu, 2003-02-20 at 03:01, Matthias Mohr wrote: > > Hmm, this would cause a problem: > > > > {foobar foo="$smarty.section.foo.tpl"} > > > > That won't work, the .tpl will get caught as part of the smarty var. I > > suppose this is acceptible though, that situation shouldn't happen. > > > > I can limit the number of segments to 3, but that leaves a hole for > > something like > > "$smarty.now.tpl" > > > > Who knows, we may have more than 3 segments to a Smarty var some day. > > We'll leave it as is for now. > Hmm, maybe it would be best to add a "escape-character", which tells the parser > that the next character does not have it's usual meaning and instead it should use it > as is? > Then you would have to write the above line as follows: > "$smarty.now\.tpl" > > I think this would solve the problems with detecting the variables-part and the text-part > > Another possibility would be the way Unix shell languages do; there you can surround any > variable with a "{" "}" -pair. > Then the above would be this: > "${smarty.now}.tpl" > But I think this would be confusing here, because the normal smarty-delimiters are also > paranthesis > and the following would look terrible in my oppinion: > {foobar foo="${smarty.section.foo}.tpl"} > > What do you think? > > with regards, > Matthias -- Monte Ohrt <monte@ispi.net>

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