[Petal] Neato Tricks That Aren't Documented Anywhere

Simon McCaughey simonmcc at nortelnetworks.com
Thu Jan 13 23:23:09 GMT 2005


[Petal] Neato Tricks That Aren't Documented Anywhere> ----- Original Message -----
> From: Warren Smith
> To: Petal Mailing List
> Sent: Thursday, January 13, 2005 6:13 PM
> Subject: [Petal] Neato Tricks That Aren't Documented Anywhere
>
> <snip>
>
> Finally, correct me if I'm wrong, but with stock Petal, you cannot
> include a file with a variable filename. So Jean-Michel helped me create
> an include: modifier that allows you to use variable names as include
> files.
> Example:
> <html>
> <head>
> <title>My Site!</title>
> </head>
> <body>
> <div petal:replace="structure include: main_content" />
> </body>
> </html>
> This allows me to have a main site layout page, and then just set
> main_content to whatever I want the content to be.
>

This looks great, I had just been using a tal:condition to do a conditional metal:use-macro to statically include the inner item.

>
>
>
> Yeah, yeah. I'm going to get a lot of "you didn't know that?" looks, but
> I didn't (wasn't documented) and thought somebody else may be having the
> same problem.

Yea, I understand, I only found the first two out through trail and error (and of course this list ;)

Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webarch.co.uk/pipermail/petal/attachments/20050113/e22f2e67/attachment.htm


More information about the Petal mailing list