<!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>&gt; ----- Original Message -----<BR>&gt; From: Warren Smith<BR>&gt; To: 
Petal Mailing List<BR>&gt; Sent: Thursday, January 13, 2005 6:13 PM<BR>&gt; 
Subject: [Petal] Neato Tricks That Aren't Documented Anywhere<BR>&gt;<BR>&gt; 
&lt;snip&gt;<BR>&gt;<BR>&gt; Finally, correct me if I'm wrong, but with stock 
Petal, you cannot<BR>&gt; include a file with a variable filename. So 
Jean-Michel helped me create<BR>&gt; an include: modifier that allows you to use 
variable names as include<BR>&gt; files.<BR>&gt; Example:<BR>&gt; 
&lt;html&gt;<BR>&gt; &lt;head&gt;<BR>&gt; &lt;title&gt;My 
Site!&lt;/title&gt;<BR>&gt; &lt;/head&gt;<BR>&gt; &lt;body&gt;<BR>&gt; &lt;div 
petal:replace="structure include: main_content" /&gt;<BR>&gt; 
&lt;/body&gt;<BR>&gt; &lt;/html&gt;<BR>&gt; This allows me to have a main site 
layout page, and then just set<BR>&gt; main_content to whatever I want the 
content to be.<BR>&gt;</DIV>
<DIV>&nbsp;</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>&gt;<BR>&gt;<BR>&gt;<BR>&gt; Yeah, yeah. I'm going to get a lot of "you 
didn't know that?" looks, but<BR>&gt; I didn't (wasn't documented) and thought 
somebody else may be having the<BR>&gt; 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>&nbsp;</DIV>
<DIV>Simon</DIV></DIV></BODY></HTML>