Hi, 

I have a TAL template for a newsletter which has a tal:repeat in it for the 
articles which are contained in that newsletter. I would like to store the 
articles in a database and insert them into the newsletter template.

However, I would like to be able to store the articles as a TAL template. If I 
insert the articles into the newsletter template the variables inside the 
article template will not be parsed anymore.

So, I would store the following code of an article in the DB:

<p>Hello ${NAME}, this is article one.</p>

And insert it into a template like this:

<html>
.....
<td tal:repeat="articles article" tal:content="article/getContent">
</td>
</html>

Now, how would I get the variable ${NAME} to be processed? What would be the 
right way to go about this? 

The only way I can think of, is to insert the articles, execute the template 
and assign the output to PHPTAL again, parse again for the article variables 
and output to screen.

Anyone have a better idea?

Kind regards,
Bas


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

Reply via email to