Re: Neato Tricks That Aren't Documented Anywhere
"Simon McCaughey" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.petal |
|---|---|
| Message-ID | <008801c4f9c6$d873b900$6fa1a02f@AtticPC> |
[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