On Friday 31 August 2007 10:31, Tobias Schlitt wrote: > On 08/30/2007 02:23 PM Raymond Bosman wrote: > > Solution 6: Struct like variable passed on > > ------------------------------------------ > > The variables send to the first template can be packed in one structure. > > For example the user application sends: > > > > $t = new ezcTemplate(); > > $t->send->structure = new ezcTemplateVariableCollection(); > > $t->send->structure->a = 1; > > $t->send->structure->b = 2; > > $t->process("p"); > > > > Template p and q are: > > > > Template p: > > {use $structure} > > {include "q" send $structure} > > > > > > Template q: > > {use $structure} > > {$structure->a} > > {$structure->b} > > I'm very much for this solution, since I see it as the cleanest one. It > keeps up with our design-goals for template and solves the issue in a > clean OO way. Beside that, it allows you to devide the data into logical > areas, which is a good thing.
We have this solution already available, that's a good thing :-). I am trying to find all possible solutions and make a list of advantages and disadvantages. Afterwards we can see what would be the cleanest way of solving the issues. The design-goals for ezcTemplate are: 1. explicit rather than implicit, and 2. clean and simple to use. Point 1. and 2. are hard to combine sometimes. Devide data in logical areas is a good thing indeed. Not sure if that is always possible. Thanks for the feedback, Raymond. -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components