Dynamic Templates with Petal
Warren Smith <wsmith-KfBRzk3UKwrYd54FQh9/[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.petal |
|---|---|
| Organization | Platinumtel Wireless |
| Message-ID | <1088888760.24706.6.camel@wsmithbox> |
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?