Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* be more careful applying the monkey-patch to the Func API * parsing RENDERZONE properly but finally inserting the zone at the end of the rendering pipeline * moved docu to separate Var topics git-svn-id: http://svn.foswiki.org/trunk@6332 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
- Loading branch information
MichaelDaum
authored and
MichaelDaum
committed
Feb 15, 2010
1 parent
6910e7b
commit 95b7783
Showing
5 changed files
with
108 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
%META:TOPICINFO{author="ProjectContributor" comment="save topic" date="1266224965" format="1.1" reprev="1.1" version="1.1"}% | ||
%META:TOPICPARENT{name="ZonePlugin"}% | ||
#VarADDTOZONE | ||
---+++ ADDTOZONE | ||
|
||
<verbatim class="tml"> | ||
%ADDTOZONE{ | ||
"zone" | ||
... | ||
}% | ||
</verbatim> | ||
|
||
* zone: optional, comma-separated list of zones the content should be added to, | ||
special zones are =body= and =head=, defaults to =head= | ||
* tag: optional, identificator for the material to be added, to be used in =requires= | ||
* requires: comma-separated list of tags that must occur before the current material, constraints the order of all material in a zone | ||
* text: optional, text to be added to the named zone, mutually exclusive with =topic= | ||
* topic: optional, full qualified web-topic name that contains the text to be added, mutually exclusive with =text= | ||
* section: optional, section of the =topic= to be added, defaults to the default section between STARTINCLUDE and | ||
STOPINCLUDE | ||
|
||
Note, that using =topic= and =section= is actually a short form of | ||
<verbatim class="tml"> | ||
%ADDTOZONE{ | ||
"myzone" | ||
text="$percntINCLUDE{\"topic\" section=\"section\" warn=\"off\"}$percnt" | ||
}% | ||
</verbatim> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
%META:TOPICINFO{author="ProjectContributor" date="1266225040" format="1.1" version="1.1"}% | ||
%META:TOPICPARENT{name="ZonePlugin"}% | ||
#VarRENDERZONE | ||
---+++ RENDERZONE | ||
|
||
<verbatim class="tml"> | ||
%RENDERZONE{"zone" ...}% | ||
</verbatim> | ||
|
||
(Note, this macro can't be spread over multiple lines.) | ||
|
||
* zone: required, name of the zone to be expanded | ||
* header: optional, prefix format string | ||
* format: optional, format string for each item added to the zone, defaults to =$item=, any standard escapes like =$percnt=, =$dollar= etc can be used to delay evaluation order of the format parameter | ||
* chomp: removed leading and trailing whitespace in formatted items, useful to pretty-print them one per line | ||
* footer: optional, suffix format string | ||
* separator: optional, put between each item of a zone | ||
|
||
Note, that you can create as many zones as you like. The plugin does not restrict you to use it only for =body= and =head=. Interesting use cases in wiki applications: | ||
|
||
* create a =sidebar= zone to add widgets | ||
* create a =toolbar= zone to add buttons icons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
data/System/VarADDTOZONE.txt 0644 | ||
data/System/VarRENDERZONE.txt 0644 | ||
data/System/ZonePlugin.txt 0644 | ||
lib/Foswiki/Plugins/ZonePlugin.pm 0644 |