You are here:
Foswiki
>
System Web
>
Plugins
>
TreePlugin
(02 Nov 2013,
UnknownUser
)
(raw view)
E
dit
A
ttach
---+!! Tree Plugin <!-- * Set SHORTDESCRIPTION = Renders topics' parent-child relationships as hierarchical tree view. Useful for dynamic site maps and threads. --> %SHORTDESCRIPTION% %TOC% ---++ Syntax Rules =%<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 <ul>-list, see [[TreePluginSamples#UlList][sample UL lists]] <br /> =ollist= is a <ol>-list, see [[TreePluginSamples#OlList][sample OL lists]] <br /> =outline= is an outline list, see [[TreePluginSamples#SampleOutlines][sample Outlines]] <br /> =hlist= is a <h _n_ >-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:<img src=\"$image\" border=\"0\">"=. | =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 =<div>= of class =treePluginHeader=. Suppressed if the tree is empty. | none | | =footer= | Output the value within a =<div>= of class =treePluginFooter=. Suppressed if the tree is empty. | none | | =zero= | Output the value within a =<div>= 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 =<div>= 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 | ---++ Samples See the following page for sample usage and output: * [[%TOPIC%Samples]] * [[%TOPIC%HeadingOutlineSample]] * [[%TOPIC%BookviewOutlineSample]] ---+++ Usage =%<nop>TREE{web="Sandbox" formatting="ullist"}%= =%<nop>TREE{web="Sandbox"}%= <verbatim class="tml"> %TREE{excludetopic="Web*" formatting="outline" format="* [[$topic][$spacetopic]]" levelprefix=" " startlevel="1"}% </verbatim> ---+++ Combination with [[Foswiki:Extensions.TreeBrowserPlugin][TreeBrowserPlugin]] =%<nop>TREEBROWSER{"file" title="%<nop>WEB%"}%= %BR% =%<nop>TREEVIEW{web="%<nop>WEB%" topic="GrandParent" formatting="outline" format="* $topic" levelprefix=" "}%= ---++ Performance consideration For each =%<nop>TREE%= or =%<nop>TREEVIEW%= tag a %SYSTEMWEB%.VarSEARCH at topic scope is performed. To reduce the scope of that search one can use =includetopic= and =excludetopic=. Those two parameters should be used by TreePlugin users worried about performance. In fact they can potently greatly reduce the processing time. For instance if you know that every topic in your tree has a common prefix you can easily make use of =includetopic=. Also when generating web tree you may want to =excludetopic= prefixed with _Web_. ---++ Plugin Settings Specify plug-in settings in =LocalSite.cfg=: * Set ={Plugins}{$pluginName}{Debug}= to =1= to enable debug output. Set to =2= to get a lot more debug output. * Set ={Plugins}{$pluginName}{NoCache}= to =1= to disable caching mechanism. Intended for development purposes only. ---++ Plugin Installation Instructions You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server. Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install". If you have any problems, or if the extension isn't available in =configure=, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help. ---++ Plugin Info | Authors: | TWiki:Main.SlavaKozlov (alpha release), [[Foswiki:Main.StephaneLenclud][Stephane Lenclud]] (2006-2008) | | Copyright ©: | Copyright (C) 2002 Slava Kozlov. All Rights Reserved. | | License: | [[http://www.gnu.org/copyleft/gpl.html][GPL]] | | Dependencies: | None | | CPAN Dependencies: | none _(test package relies on Wiki:PerlUnit)_ | | Version: | 6156 (2010-01-27) | | Release: | 1.9.1 | | Change History: | <!-- specify latest version first --> | | 27 Jan 2010 | 1.91 - Documentation tweaks. By [[Foswiki:Main.PaulHarvey]] | | 11 Nov 2009 | 1.9 - Fixed version numbering for configure. By [[Foswiki:Main.IngoKappler][Ingo Kappler]] | | 12 Dec 2008 | 1.8 - Foswiki port. By [[Foswiki:Main.StephaneLenclud][Stephane Lenclud]] | | 28 Aug 2008 | 1.7 - Fixing warnings in apache logs. Fixing broken cache generation when using =excludetopic= or =includetopic=. Better support for Sub Webs and Non-Wiki words from [[Foswiki:Main.ColasNahaboo][Colas Nahaboo]]. By [[Foswiki:Main.StephaneLenclud][Stephane Lenclud]] | | 10 Apr 2008 | 1.6 - File cache implementation. Massive performance improvement for Topic tree. No performance gain for Web tree. Added =nocache= parameter. Now using =LocalLib.cfg= for settings. By [[Foswiki:Main.StephaneLenclud][Stephane Lenclud]] | | 10 Apr 2008 | 1.5 - Slight performance improvement. Improved =header= parameter. Added =footer= and =zero= parameter. By [[Foswiki:Main.StephaneLenclud][Stephane Lenclud]] | | 29 Mar 2008 | 1.4 - Fixed endless loop in =imageoutline:thread=. Added =separator= parameter. By [[Foswiki:Main.StephaneLenclud][Stephane Lenclud]] | | 11 Jul 2007 | 1.3 - Fixed =$onum= to =$outnum= in documentation. Fixed endless loop on inconsistent/looping parent/child relationship. Not supporting =bookview= any more. Fixed =imageoutline:thread= not rendering. By [[Foswiki:Main.StephaneLenclud][Stephane Lenclud]] | | 7 Apr 2007 | 1.2 - Documentation improvement. Adding =includetopic= parameter. By [[Foswiki:Main.StephaneLenclud][Stephane Lenclud]] | | 6 Apr 2007 | 1.1 - Even more code cleaning. Rewrote tree building algorithm. Orphaned topics are now sorted as if child of the web root. No more blank line in the middle of the tree. Adding =nodiv= parameter. By [[Foswiki:Main.StephaneLenclud][Stephane Lenclud]] | | 6 Apr 2007 | 1.0 - More code cleaning. Testing most formatting. Better support for =web="all"=. By [[Foswiki:Main.StephaneLenclud][Stephane Lenclud]] | | 6 Apr 2007 | 0.9 - Support for %SYSTEMWEB%.FormattedSearch pseudo-variables. Code cleaning in =TreePlugin.pm=. Removed some dead code. Improved documentation. By [[Foswiki:Main.StephaneLenclud][Stephane Lenclud]] | | 4 Apr 2007 | 0.8 - Adding =excludetopic= parameter. Adding =%<nop>TREE%= as synonym tag. Code cleaning in =TreePlugin.pm=. Fix root issue when no =topic= specified. By [[Foswiki:Main.StephaneLenclud][Stephane Lenclud]] | | 14 Mar 2007 | 0.7.1 - Arthur Clemens: Made =startlevel= and =stoplevel= relative to the root topic. | | 14 Mar 2007 | 0.7 - Arthur Clemens: =web= parameter is now actually used. Added parameter =startlevel=. | | 01 Oct 2006 | 0.6 - [[Foswiki:Main.StephaneLenclud][Stephane Lenclud]]: adding =$index= format subsitution. Useful when used in combination with Foswiki:Extensions/TreeBrowserPlugin. Also attempting to restore compatibility with Cairo, but still waiting for someone to test it. | | 16 Sep 2006 | 0.5 - [[Foswiki:Main.StephaneLenclud][Stephane Lenclud]]: adding =levelprefix= parameter to unable usage in combination with Foswiki:Extensions/TreeBrowserPlugin. | | 26 Jul 2006: | 0.4 - [[Foswiki:Main.SteffenPoulsen][Steffen Poulsen]]: Ported to T* 4 (Dakar). Leading text removed, less warnings, no double bracket links, CSS classnames around output. | | 15 Feb 2002 | Alpha (0.2) release | | 08 Feb 2002 | Internal (0.1) release | | Home: | Foswiki:Extensions.%TOPIC% | | Support: | Foswiki:Support.%TOPIC% | | Development: | Foswiki:Development.%TOPIC% | __Related Topics:__ %SYSTEMWEB%.DefaultPreferences, %USERSWEB%.SitePreferences, [[%SYSTEMWEB%.Plugins][Plugins]]
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Edit
w
iki text
|
M
ore topic actions
Topic revision: r1 - 02 Nov 2013,
UnknownUser
System
Log In
or
Register
Toolbox
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
User Reference
BeginnersStartHere
TextFormattingRules
Macros
FormattedSearch
QuerySearch
DocumentGraphics
SkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
SiteTools
DefaultPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Webs
Cosmo
Main
Sandbox
System
English
Français
Polski
Copyright © CC-BY-SA by the contributing authors. All material on this collaboration platform is copyrighted under CC-BY-SA by the contributing authors unless otherwise noted.
Ideas, requests, problems regarding Foswiki?
Send feedback