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.

Regards,
Toby
-- 
Mit freundlichen Grüßen / Med vennlig hilsen / With kind regards

Tobias Schlitt (GPG: 0xC462BC14) eZ Components Developer

[EMAIL PROTECTED] | eZ Systems AS | ez.no
-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to