[Petal] metal:use-macro should be TALES?

Jonathan Vanasco jon at 2xlp.com
Fri Mar 3 16:54:07 GMT 2006


Usually for things like that, i do:

<tal tal:omit-tag="string:1" tal:define="dynVar foo/${dat/bar}/ 
baz.xml"/>
<span tal:attributes="class var"/>

I'm not sure if that will work in your example.

btw, you can just
	$processed =~ s/&amp;/&/g ;

i do that for a bunch of petal symbols when doing emails/etc


On Mar 3, 2006, at 10:54 AM, adam wrote:

> Howdy.
>
> I'm fairly new to petal, and have been battling through the  
> standard problems (overcoming my aversion to &amp;s in hrefs,  
> javascript stuff etc etc), but am stumped on the latest one.
>
> Basically I want to choose which metal template to use at run-time,  
> using something along the lines of
>
> metal:use-macro="dat/header" or
> metal:use-macro="foo/${dat/bar}/baz.xml" or
> metal:use-macro="string: dat/header"
>
> Is this supported? Should I be doing something entirely different?
>
> Thanks for your help,
> -- 
> Adam



More information about the Petal mailing list