is there any way to make PHPTAL process dynamically inserted content?

I want to use a »skeleton template« for my website which could look as follows:


  <div id="header">
   <tal:block tal:repeat="app headerElements">
    <tal:block metal:use-macro="{$app}.html/headerElement"


  <div id="content">
   <tal:block metal:use-macro="{$requestedApp}.html/content" />


Depending on which page has been requested, content area, sidebar, header etc.
would be filled with the appropriate content. (e.g. if you request
example.com/blog a tag cloud will appear in the sidebar and the latest blog
entries will be shown in the content area)

If a static page is requested, it would be fetched from the database. But I
don't just want it the HTML to be inserted, I want PHPTAL to process the
contents fetched from the database, so that e.g. links can be generated
automatically. So what I'd need is the ability to call a macro which is not
inside a file. (Of course, I could write it to a cache file and save that in the
template directory, but that's not very convenient.)


PHPTAL mailing list

Reply via email to