[PHPTAL] Re: SourceResolver path in nested macro

2010-08-06 Thread Bas Kooij
Thanks for the reply, So if I name the macro customMacro/customMacro the resolver would recognize it? But that makes the second part irrelevant for CustomResolvers right? Slightly off topic... I really love PHPTal, it has cut development time for implementing templates in half. The only

Re: [PHPTAL] Re: SourceResolver path in nested macro

2010-08-06 Thread Kornel Lesiński
On 6 Aug 2010, at 10:35, Bas Kooij wrote: Thanks for the reply, So if I name the macro customMacro/customMacro the resolver would recognize it? But that makes the second part irrelevant for CustomResolvers right? Right. If you use path customMacro/customMacro then resolver will get

[PHPTAL] Re: SourceResolver path in nested macro

2010-08-06 Thread Bas Kooij
Slightly off topic... I really love PHPTal, it has cut development time for implementing templates in half. The only time I get stuck is when I have to insert dynamic templates into my PHPTal template files. This is quite a common occurrence when clients use a content

Re: [PHPTAL] Re: SourceResolver path in nested macro

2010-08-06 Thread Kornel Lesiński
On 6 Aug 2010, at 12:16, Bas Kooij wrote: This is what prefilters are for: class DateMagic extends PHPTAL_PreFilter { function filter($src) {return str_replace('[DATE]', 'span tal:content=date | nothing /', $src);} } $phptal-addPreFilter(new DateMagic()); I tried usign

[PHPTAL] Re: SourceResolver path in nested macro

2010-08-06 Thread Bas Kooij
Sorry, I tried to simplify things by using a date tag, but this has just caused confusion. I don't just need to replace a date tag, I need to replace a tag named logos, which I'd like to replace with a macro containing TAL code to insert a bunch of company logo's. I have now done it like this: