<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>[Petal] Neato Tricks That Aren't Documented Anywhere</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>
<DIV>> ----- Original Message -----<BR>> From: Warren Smith<BR>> To:
Petal Mailing List<BR>> Sent: Thursday, January 13, 2005 6:13 PM<BR>>
Subject: [Petal] Neato Tricks That Aren't Documented Anywhere<BR>><BR>>
<snip><BR>><BR>> Finally, correct me if I'm wrong, but with stock
Petal, you cannot<BR>> include a file with a variable filename. So
Jean-Michel helped me create<BR>> an include: modifier that allows you to use
variable names as include<BR>> files.<BR>> Example:<BR>>
<html><BR>> <head><BR>> <title>My
Site!</title><BR>> </head><BR>> <body><BR>> <div
petal:replace="structure include: main_content" /><BR>>
</body><BR>> </html><BR>> This allows me to have a main site
layout page, and then just set<BR>> main_content to whatever I want the
content to be.<BR>></DIV>
<DIV> </DIV>
<DIV>This looks great, I had just been using a tal:condition to do a conditional
metal:use-macro to statically include the inner item.</DIV>
<DIV><BR>><BR>><BR>><BR>> Yeah, yeah. I'm going to get a lot of "you
didn't know that?" looks, but<BR>> I didn't (wasn't documented) and thought
somebody else may be having the<BR>> same problem.<BR></DIV>
<DIV>Yea, I understand, I only found the first two out through trail and error
(and of course this list ;)</DIV>
<DIV> </DIV>
<DIV>Simon</DIV></DIV></BODY></HTML>