Skip to content

Commit

Permalink
Item13634: Doc updates, add VarTREEVIEW topic
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Aug 26, 2015
1 parent ebd5de8 commit c4d49f3
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 27 deletions.
37 changes: 10 additions & 27 deletions data/System/TreePlugin.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1440477332" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1440557272" format="1.1" version="1"}%
%META:TOPICPARENT{name="Plugins"}%
---+!! Tree Plugin
<!--
Expand All @@ -13,24 +13,7 @@

=%<nop>TREEVIEW{}%= displays topic children in a hierarchical tree <br /> =%<nop>TREE{}%= synonym of =%<nop>TREEVIEW{}%=

| *Parameter* | *Description* | *Default* |
| =web= | The web to search. | current web |
| =topic= | Specify tree's root topic. If none the entire web topics' tree is generated | none |
| =formatting= | Specify the formatting method <br /> =ullist= is a &lt;ul&gt;-list, see [[TreePluginSamples#UlList][sample UL lists]] <br /> =ollist= is a &lt;ol&gt;-list, see [[TreePluginSamples#OlList][sample OL lists]] <br /> =outline= is an outline list, see [[TreePluginSamples#SampleOutlines][sample Outlines]] <br /> =hlist= is a &lt;h _n_ &gt;-list of section heads, see [[TreePluginSamples#SampleHList][sample Headlines]] <br /> =coloroutline:colorlist= is an outline formatting with level values turned into colors, see [[TreePluginSamples#SampleNestedTables][sample Nested tables]]. Example: =formatting="coloroutline:#ffeeff,#eeffee,#ffffee,#eeeeff,#ffeeee,#eeffff"= <br /> =imageoutline:mode= is a way to incorporate images into the outline format, specifically to display thread-like and folder views, see [[TreePluginSamples#SampleImageTrees][sample Image Trees]]. The general format is: imageoutline: _mode_ : _images_ : _imageformat_. Example: =formatting="imageoutline:thread"= or =formatting="imageoutline:thread:I.gif,white.gif,T.gif,L.gif:&lt;img src=\"$image\" border=\"0\"&gt;"=. | =outline= |
| =excludetopic= | Same meaning as %SYSTEMWEB%.VarSEARCH =excludetopic=. Topics with excluded parent or processed like topic without parent. | none |
| =includetopic= | Same meaning as %SYSTEMWEB%.VarSEARCH =topic=. Can improve processing time. | none |
| =startlevel= | The depth of the tree to start showing nodes from. To hide the root node, supply =startlevel="1"= (root is level 0). The displayed node depths are relative to the root topic. | =0= or =1= if =topic= is not specified |
| =stoplevel= | The depth of the tree to show, relative to start level. | =999= |
| =header= | Output the value within a =&lt;div&gt;= of class =treePluginHeader=. Suppressed if the tree is empty. | none |
| =footer= | Output the value within a =&lt;div&gt;= of class =treePluginFooter=. Suppressed if the tree is empty. | none |
| =zero= | Output the value within a =&lt;div&gt;= of class =treePluginZero= if the tree is empty. | none |
| =bookview= | List topics in BookView form. %RED%Not supported from v0.9. Instead use something like: %ENDCOLOR% <verbatim>%TREE{topic="GrandParent" formatting="outline" format="$outnum $topic <br /> $summary <hr />"}%</verbatim> | none |
| =format= | Specify the format for each node ( =outline= & =coloroutline=). The following pseudo-variable are supported on top of the ones described in %SYSTEMWEB%.FormattedSearch: <br /> =$spacetopic= - the topic with spaces <br /> =$level= - the tree depth of the topic (in whatever format) <br /> =$count= - the topic's child position <br /> =$index= - the index of the topic in the tree. Starts from one. Most useful when used in combination with [[Foswiki:Extensions.TreeBrowserPlugin][TreeBrowserPlugin]] <br /> =$outnum= - outline number for the topic (eg, 1.3.4.2) <br /> =$url= - the current topic's URL %RED%Not supported. Use =%<nop>SCRIPTURL{view}%/$web/$topic= instead. %ENDCOLOR% <br /> =$author= - the topic's last author %RED%Not supported from v0.9. Use =%<nop>AUTHOR%= instead. %ENDCOLOR% <br /> =$modTime= - the topic's modification time. %RED%Not supported from v0.9. Use =$date= instead. %ENDCOLOR% | none |
| =formatbranch= | - specify the format for a group of children ( =outline= & =coloroutline=) <br /> =$parent= - the text of a node <br /> =$children= - the text of all the node's children (if any) | none |
| =levelprefix= | Specify a prefix to a node format. The prefix is inserted =$level= times at the beginning of the rendered node format. It allows generation of trees using Foswiki bullet list syntax thus enabling usage of !TreePlugin [[#Combination_with_TreeBrowserPlug][in combination with TreeBrowserPlugin]]. | none |
| =nodiv= | Suppress the =&lt;div&gt;= around the tree. Set to =2= to suppress =div= around =header=, =footer= and =zero=. Allows for trees concatenation. | none |
| =separator= | Character string used to separate items in the tree | =\n= |
| =nocache= | Set to 1 to disable caching mechanism for that specific tree. Really a developer setting. | 0 |
%INCLUDE{"VarTREEVIEW" section="treeview_attributes"}%

---++ Samples

Expand Down Expand Up @@ -114,11 +97,11 @@ Alias /icons "/usr/share/apache2/icons"

__Related Topics:__ %SYSTEMWEB%.DefaultPreferences, %USERSWEB%.SitePreferences, [[%SYSTEMWEB%.Plugins][Plugins]]

%META:FILEATTACHMENT{name="oT.gif" attr="h" comment="" date="1440477332" size="879" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="I.gif" attr="h" comment="" date="1440477332" size="869" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="white.gif" attr="h" comment="" date="1440477332" size="56" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="pL.gif" attr="h" comment="" date="1440477332" size="880" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="oL.gif" attr="h" comment="" date="1440477332" size="874" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="L.gif" attr="h" comment="" date="1440477332" size="864" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="T.gif" attr="h" comment="" date="1440477332" size="873" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="pT.gif" attr="h" comment="" date="1440477332" size="883" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="oT.gif" attr="h" comment="" date="1440557272" size="879" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="I.gif" attr="h" comment="" date="1440557272" size="869" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="white.gif" attr="h" comment="" date="1440557272" size="56" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="pL.gif" attr="h" comment="" date="1440557272" size="880" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="oL.gif" attr="h" comment="" date="1440557272" size="874" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="L.gif" attr="h" comment="" date="1440557272" size="864" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="T.gif" attr="h" comment="" date="1440557272" size="873" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="pT.gif" attr="h" comment="" date="1440557272" size="883" user="ProjectContributor" version="1"}%
32 changes: 32 additions & 0 deletions data/System/VarTREEVIEW.txt
@@ -0,0 +1,32 @@
%META:TOPICINFO{author="ProjectContributor" date="1434650530" format="1.1" version="1"}%
%META:TOPICPARENT{name="Macros"}%
---+ =%<nop>TREEVIEW{}%= displays topic children in a hierarchical tree <br /> =%<nop>TREE{}%= synonym of =%<nop>TREEVIEW{}%=
%STARTSECTION{"treeview_attributes"}%
---++ Parameters
* The following standard attributes are recognized
%TABLE{sort="off"}%
| *Parameter* | *Description* | *Default* |
| =web= | The web to search. | current web |
| =topic= | Specify tree's root topic. If none the entire web topics' tree is generated | none |
| =formatting= | Specify the formatting method <br /> =ullist= is a &lt;ul&gt;-list, see [[TreePluginSamples#UlList][sample UL lists]] <br /> =ollist= is a &lt;ol&gt;-list, see [[TreePluginSamples#OlList][sample OL lists]] <br /> =outline= is an outline list, see [[TreePluginSamples#SampleOutlines][sample Outlines]] <br /> =hlist= is a &lt;h _n_ &gt;-list of section heads, see [[TreePluginSamples#SampleHList][sample Headlines]] <br /> =coloroutline:colorlist= is an outline formatting with level values turned into colors, see [[TreePluginSamples#SampleNestedTables][sample Nested tables]]. Example: =formatting="coloroutline:#ffeeff,#eeffee,#ffffee,#eeeeff,#ffeeee,#eeffff"= <br /> =imageoutline:mode= is a way to incorporate images into the outline format, specifically to display thread-like and folder views, see [[TreePluginSamples#SampleImageTrees][sample Image Trees]]. The general format is: imageoutline: _mode_ : _images_ : _imageformat_. Example: =formatting="imageoutline:thread"= or =formatting="imageoutline:thread:I.gif,white.gif,T.gif,L.gif:&lt;img src=\"$image\" border=\"0\"&gt;"=. | =outline= |
| =excludetopic= | Same meaning as %SYSTEMWEB%.VarSEARCH =excludetopic=. Topics with excluded parent or processed like topic without parent. | none |
| =includetopic= | Same meaning as %SYSTEMWEB%.VarSEARCH =topic=. Can improve processing time. | none |
| =startlevel= | The depth of the tree to start showing nodes from. To hide the root node, supply =startlevel="1"= (root is level 0). The displayed node depths are relative to the root topic. | =0= or =1= if =topic= is not specified |
| =stoplevel= | The depth of the tree to show, relative to start level. | =999= |
| =header= | Output the value within a =&lt;div&gt;= of class =treePluginHeader=. Suppressed if the tree is empty. | none |
| =footer= | Output the value within a =&lt;div&gt;= of class =treePluginFooter=. Suppressed if the tree is empty. | none |
| =zero= | Output the value within a =&lt;div&gt;= of class =treePluginZero= if the tree is empty. | none |
| =bookview= | List topics in BookView form. %RED%Not supported from v0.9. Instead use something like: %ENDCOLOR% <verbatim>%TREE{topic="GrandParent" formatting="outline" format="$outnum $topic <br /> $summary <hr />"}%</verbatim> | none |
| =format= | Specify the format for each node ( =outline= & =coloroutline=). The following pseudo-variable are supported on top of the ones described in %SYSTEMWEB%.FormattedSearch: <br /> =$spacetopic= - the topic with spaces <br /> =$level= - the tree depth of the topic (in whatever format) <br /> =$count= - the topic's child position <br /> =$index= - the index of the topic in the tree. Starts from one. Most useful when used in combination with [[Foswiki:Extensions.TreeBrowserPlugin][TreeBrowserPlugin]] <br /> =$outnum= - outline number for the topic (eg, 1.3.4.2) <br /> =$url= - the current topic's URL %RED%Not supported. Use =%<nop>SCRIPTURL{view}%/$web/$topic= instead. %ENDCOLOR% <br /> =$author= - the topic's last author %RED%Not supported from v0.9. Use =%<nop>AUTHOR%= instead. %ENDCOLOR% <br /> =$modTime= - the topic's modification time. %RED%Not supported from v0.9. Use =$date= instead. %ENDCOLOR% | none |
| =formatbranch= | - specify the format for a group of children ( =outline= & =coloroutline=) <br /> =$parent= - the text of a node <br /> =$children= - the text of all the node's children (if any) | none |
| =levelprefix= | Specify a prefix to a node format. The prefix is inserted =$level= times at the beginning of the rendered node format. It allows generation of trees using Foswiki bullet list syntax thus enabling usage of !TreePlugin [[#Combination_with_TreeBrowserPlug][in combination with TreeBrowserPlugin]]. | none |
| =nodiv= | Suppress the =&lt;div&gt;= around the tree. Set to =2= to suppress =div= around =header=, =footer= and =zero=. Allows for trees concatenation. | none |
| =separator= | Character string used to separate items in the tree | =\n= |
| =nocache= | Set to 1 to disable caching mechanism for that specific tree. Really a developer setting. | 0 |
%ENDSECTION{"treeview_attributes"}%

---++ Examples
See the following page for sample usage and output:
* [[TreePluginSamples]]
* [[TreePluginHeadingOutlineSample]]
* [[TreePluginBookviewOutlineSample]]
1 change: 1 addition & 0 deletions lib/Foswiki/Plugins/TreePlugin/MANIFEST
@@ -1,6 +1,7 @@
data/System/TreePluginHeadingOutlineSample.txt 0644
data/System/TreePluginBookviewOutlineSample.txt 0644
data/System/TreePlugin.txt 0644
data/System/VarTREEVIEW.txt 0644
data/System/TreePluginSamples.txt 0644
lib/Foswiki/Plugins/TreePlugin.pm 0644
lib/Foswiki/Plugins/TreePlugin/ColorNodeFormatter.pm 0644
Expand Down

0 comments on commit c4d49f3

Please sign in to comment.