[Petal] tal/petal naming bug?
Jean-Michel Hiver
jhiver at mkdoc.com
Thu Jul 22 03:41:00 BST 2004
Kevin Teague wrote:
> Is the following a known bug in Petal?
>
> <html>
> <body>
> <div metal:use-macro="foo.pt#bar" />
> </body>
> </html>
>
> And then within the foo.pt macro:
>
> <div metal:define-macro="bar">
> <p tal:content="somevar" />
> <p metal:content="somevar" />
> </div>
metal:content will *not work*...
> Only the second paragraph works, it seems that within a macro Petal only
> recognizes the "petal:" syntax and not the "tal:" syntax.
>
> Also, thanks for implementing the metal:define-macro and metal:use-macro
> functions, these make writting larger TAL sites much nicer.
from 'perldoc Petal'
NAMESPACE
Although this is not mandatory, Petal templates should include use the
namespace http://purl.org/petal/1.0/. Example:
<html xml:lang="en"
lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://purl.org/petal/1.0/">
Blah blah blah...
Content of the file
More blah blah...
</html>
As for METAL, metal:define-slot and metal:fill-slot should work as of 2.07.
Also, i18n: is well on the way and should be there *very soon* :-)
More information about the Petal
mailing list