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 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 
management system to edit pages. I want them to be able to insert some sort of 
tags in 
the CMS, ie. [DATE], which I can then replace with PHPTal code, for instance 
<span 
tal:content="date | nothing" />. 

The way to go for this at the moment is using CustomSourceResolvers, which are 
not 
entirely trivial to implement. Would it be a bad idea to implement some sort 
of custom 
keyword which would allow inserting code into the template? What if you could 
write 
the following in your PHPTal template:

<div tal:content="reparse cmsHtml" />

Where the cmsContent would be a TAL variable containing more TAL containing 
more TAL 
code. This way I could retrieve the HTML with tags from the database, replace 
tags 
with TAL code and insert it into my templates very easily.

Sorry for the rant, I know all this can be achieved at the moment. I'm just 
throwing 
an idea out there.

Regards,

Bas Kooij


_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to