25 Sep 23:28
interpolate variable in metal:use-macro?
From: Corey <corey_s@...>
Subject: interpolate variable in metal:use-macro?
Newsgroups: gmane.comp.lang.perl.modules.petal
Date: 2006-09-25 21:29:22 GMT
Subject: interpolate variable in metal:use-macro?
Newsgroups: gmane.comp.lang.perl.modules.petal
Date: 2006-09-25 21:29:22 GMT
Say I've got a variable stuffed into my template: tmpl/macro which would store a string, such as: "product1.html#content". Now, I'd like to use what's in 'tmpl/macro' in order to include a metal macro, like so: <span metal:use-macro="tmpl/macro" petal:omit-tag="" /> ... unfortunately, it doesn't look like tmpl/page is interpolating within the 'metal:use-macro=' ... "[PETAL ERROR] Cannot find tmpl/macro in ......" I'd really prefer to not have to do something like: <span metal:use-macro="product1.html#content" petal:omit-tag="" /> <span metal:use-macro="product2.html#content" petal:omit-tag="" /> <span metal:use-macro="product3.html#content" petal:omit-tag="" /> etc.,etc.etc for each my, say, 10-30 products... Am I missing something obvious? Thanks!
RSS Feed