Re: Sigma template

From: Date: Thu, 08 Jul 2004 20:18:14 +0000
Subject: Re: Sigma template
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13562@lists.php.net to get a copy of this message
Hi Alexey, This was brought up a while ago but I think this still deserves some attention: --------------------------- On Thu, 2004-05-20 at 06:06, Alexey Borzov wrote: ... > > 2. If there are two identical calls to the same function with the same > > parameters within the same block, the result from the first call is > > saved and used for the second call. This might seem like a good idea, > > however these two calls might return different results - for example, > > toggling the colors of table rows. There is an easy way to bypass this - > > just introduce a dummy parameter to make these calls look different. > > However this is a little cumbersome. It would be much better to be able > > to either turn on/off this behavior, or maybe instead be able to save > > results from function calls into local variables for later use, e.g. > > > > ...{aaa='blah-blah-blah':function}.....{aaa} > > > > This doesn't look like it is very difficult to implement. > > This behaviour is by design. I do not want to change it and do not want > to add Smarty-like syntax for assigning the variables: dummy parameter > is way easier to add than the convoluted construct you propose. --------------------------- There are a few problems with this: 1) The documentation is no longer accurate (see the example with the toggle() function for bgcolor callback) http://pear.php.net/manual/en/package.html.html-template-sigma.intro-syntax.php 2) Some calls return random values from a database. The templating engine then only displays the first return value. It sounds like there should really be a boolean option to setCallBackVariable called RememberFirstValue and set by default to TRUE if this is by design. Thanks, Xavier Spriet.

« previous php.pear.general (#13562) next »