RENDERZONE
%RENDERZONE{"zone" ...}%See ADDTOZONE for an explanation of zones. Parameters:
-
"zone"
required, name of the zone. -
format="..."
optional, format string for each item added to the zone, default:$item <!--<literal> $id $missing</literal>-->
Tokens:-
$id
-id
of the ADDTOZONE call within thezone
currently being rendered. -
$item
- text of the ADDTOZONE call within thezone
currently being rendered. -
$zone
- the"zone"
currently being rendered. -
$missing
- if the ADDTOZONE call being rendered required anyid
which was not found, then$missing
is themissingtoken
parameter; empty string otherwise. -
$missingids
- comma separated list of ids that were required by the ADDTOZONE call currently being rendered but weren't found within thiszone
.
-
-
missingtoken="..."
optional, this will be the string assigned to the$missing
format token for use in theformat
parameter. Default:$id: requires= missing ids: $missingids
-
chomp="on"
remove leading and trailing whitespace from formatted items, can be useful for pretty-printing and compression. -
header="..."
optional, prepended to the output -
footer="..."
optional, appended to the output -
separator="..."
optional, put between each item of a zone
-
header
andfooter
are not output if there is no content in the zone (nothing has beenADDTOZONEd
). However they are output if the output is the empty string (at least oneADDTOZONE
has been processed). - Zones are cleared after being rendered; they are only ever rendered once.
-
head
andscript
are automatic zones. They don't require a correspondingRENDERZONE
anywhere in the templates - they are automatically inserted before the</head>
tag in the output HTML page. - Normally, dependencies between individual
ADDTOZONE
statements are resolved within each zone. However, if{MergeHeadAndScriptZones}
is enabled in configure, thenhead
content which requires anid
that only exists inscript
will be re-ordered to satisfy this dependency.{MergeHeadAndScriptZones}
will be removed from a future version of Foswiki.