RE: [PHPTAL] Duplcate/repeated macros
Just what I was after. Thanks Kornel. -Original Message- From: phptal-boun...@lists.motion-twin.com [mailto:phptal-boun...@lists.motion-twin.com] On Behalf Of Kornel Lesinski Sent: 07 March 2010 15:53 To: Template Attribute Language for PHP Subject: Re: [PHPTAL] Duplcate/repeated macros On 07.03.2010, at 15:44, Rowan @ Jetboy wrote: > A very simple example. If I have a macro with a slot: > > > > > > and another macro: > > > > > > I can fill 'slot' with multiple instances of 'box' like: > > > > > > > > > As I'd expect, just using $template->heading = 'Heading name', echos 'Heading name' to both boxes. What do I need to change so I can insert unique heading content into each 'box' instance? You can locally redefine variables using tal:define, like this: -- regards, Kornel ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
Re: [PHPTAL] Duplcate/repeated macros
On 07.03.2010, at 15:44, Rowan @ Jetboy wrote: > A very simple example. If I have a macro with a slot: > > > > > > and another macro: > > > > > > I can fill 'slot' with multiple instances of 'box' like: > > > > > > > > > As I'd expect, just using $template->heading = 'Heading name', echos 'Heading > name' to both boxes. What do I need to change so I can insert unique heading > content into each 'box' instance? You can locally redefine variables using tal:define, like this: -- regards, Kornel ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
[PHPTAL] Duplcate/repeated macros
A very simple example. If I have a macro with a slot: and another macro: I can fill 'slot' with multiple instances of 'box' like: As I'd expect, just using $template->heading = 'Heading name', echos 'Heading name' to both boxes. What do I need to change so I can insert unique heading content into each 'box' instance? ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal