Re: [SMARTY-DEV] template param syntax

From: Date: Tue, 16 Dec 2003 06:28:35 +0000
Subject: Re: [SMARTY-DEV] template param syntax
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1995@lists.php.net to get a copy of this message
> > {err "sdfsdf" fatal} > > > > Obviously, the latter form has its clear merits for template > > users. (I'm sure everybody agrees this. So far so good.) > The cool > thing is that nothing stops you from supporting that in your own custom > plugins if you wish--you 'simply' have to write your plugin as a > compiler function as opposed to a standard function plugin. In that > case, Smarty does not automatically handle the paramater assigning--it > is left for your compiler function to do that. I believe messju already > noted this in the original thread. Thanks, that may be OK. (Depends on how much extra work to do in that compiler plugin.) > > So, please, I hereby BEG you... Please, add this feature > > and drop the rigid adherance to the superfluous > > > > arg="afsfadf" > > > > syntax! > > Please don't! Doing so would break every single installation currently > using Smarty. Why would that be a good thing? I could be wrong, but I > doubt that order-based parameters (as opposed to named parameters) will > ever be supported for standard function plugins. No, no, I don't want, at all, to push for ordered arg. passing, don't worry. :) (God forbid to even think about that. I completely agree with you.) What I want is just _extending_ the syntax, in a compatible manner with any exsiting reasonable Smarty installations. I just want to get Smarty accepting things like I mentioned above, by dafult, so the only incompatibility would be that instead of getting Fatal error: Smarty: [in index.tpl line 2]: syntax error: expecting '=' after attribute name 'fatal' (Smarty_Compiler.class.php, line 1474) in Smarty_Compiler .class.php on line 2062 we's implicitly get equivalent behavior to as if we had written fatal=1 I think this is clear a win-win situation. (Or is this not a asles list here?... ;-) ) > > {if 0} > > > > (and more?) already *is* officially supported... > > Don't confuse built-in constructs like "if" with standard function > plugins. (Yeps, I just mentioned this one to stop people, in advance, who would have liked to argue on grounds of XHTML-ish formalism or stuff like that... :) ) Thanks very much, Sz.

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