Hi,

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:

<html>
 <head>
  [...]
 </head>
 <body>

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

  [...]

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

 </body>
</html>

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.)

Thanks,
Moritz


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

Reply via email to