| Revision 8211,
1.3 KB
checked in by CrawfordCurrie, 3 years ago
(diff) |
|
Item8841: more wrinkles uncovered in the zone support
|
| Line | |
|---|
| 1 | %META:TOPICINFO{author="ProjectContributor" date="1266225040" format="1.1" version="1.1"}% |
|---|
| 2 | %META:TOPICPARENT{name="Macros"}% |
|---|
| 3 | #VarRENDERZONE |
|---|
| 4 | ---+++ RENDERZONE |
|---|
| 5 | |
|---|
| 6 | <verbatim class="tml"> |
|---|
| 7 | %RENDERZONE{"zone" ...}% |
|---|
| 8 | </verbatim> |
|---|
| 9 | See [[VarADDTOZONE][ADDTOZONE]] for an explanation of _zones_. |
|---|
| 10 | |
|---|
| 11 | Parameters: |
|---|
| 12 | * ="zone"= required, name of the zone |
|---|
| 13 | * =header="..."= optional, prefix format string |
|---|
| 14 | * =format="..."= optional, format string for each item added to the zone, defaults to =$item=. |
|---|
| 15 | * =chomp="on"= remove leading and trailing whitespace from formatted items, can be useful for pretty-printing and compression. |
|---|
| 16 | * =footer="..."= optional, suffix format string |
|---|
| 17 | * =separator="..."= optional, put between each item of a zone |
|---|
| 18 | |
|---|
| 19 | Supports the [[FormatTokens][standard format tokens]] in the =format= and =separator= (but *not* in the =header= or =footer=). |
|---|
| 20 | |
|---|
| 21 | =header= and =footer= are output irrespective of whether there is any content |
|---|
| 22 | in the zone or not. |
|---|
| 23 | |
|---|
| 24 | =head= and =body= are _built-in_ zones - there is no corresponding =RENDERZONE= |
|---|
| 25 | required in the templates. |
|---|
| 26 | |
|---|
| 27 | Note that you can create as many zones as you like. You are not restricted |
|---|
| 28 | to just =body= and =head=. Interesting use cases in wiki applications: |
|---|
| 29 | |
|---|
| 30 | * create a =sidebar= zone to add widgets |
|---|
| 31 | * create a =toolbar= zone to add buttons icons |
|---|
| 32 | |
|---|
| 33 | See also [[VarADDTOZONE][ADDTOZONE]] |
|---|
Note: See
TracBrowser
for help on using the repository browser.