[Petal] Dynamic Templates with Petal

Warren Smith wsmith at platinumtel.com
Sat Jul 3 22:06:00 BST 2004


I'm having troubles getting dynamic includes to work. I'm trying to do
something like this:

--- site.html
<html>
  ... header stuff ...
    <div metal:use-macro="${content_template}#content"></div>
  ... footer stuff ...
</html>

where content_template is a value passed to the Petal object on
process() and contains a valid path to a file which contains

<div metal:define-macro="content">
  stuff stuff stuff
</div>

Petal seems to ignore ${content_template} in this case and not parse it.
Instead, it looks for a file name ${content_template}. Is there a way
around this?



More information about the Petal mailing list