[Petal] Dynamic includes...
Chris Croome
chris at webarchitects.co.uk
Wed Dec 15 14:16:27 GMT 2004
Hi
On Sun 12-Dec-2004 at 02:07:10PM -0500, Josh Narins wrote:
>
> I would like to do dynamic includes like this...
>
> $template->process({ extra_content => '/other.xml'})
>
> And have the file referred to by "extra_content" in the href
> attribute of this this template:
>
> <xi:include href="" />
>
> or this file attribute of this one...
> <?include file=""?>
>
> But I can't seem to get either to work.
I can't help with the Perl code you need, but FWIW both the include
syntaxes you have been trying are old hacks and the best way to do this
is using macros, these take a bit of getting used to but they are a lot
more powerful, they are documented here:
http://search.cpan.org/~jhiver/Petal-2.14/lib/Petal.pm#METAL_MACROS
Chris
--
Chris Croome <chris at webarchitects.co.uk>
web design http://www.webarchitects.co.uk/
web content management http://mkdoc.com/
More information about the Petal
mailing list