New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists

%TREEVIEW{}% displays topic children in a hierarchical tree
%TREE{}% synonym of %TREEVIEW{}%

Place the tag %TREEBROWSER{ parameters }% immediately before a bulleted or numbered list. The lists can be handcrafted, generated by another Plugin, a %TOC%, or the result of a FormattedSearch. The list will be rendered in a tree-like fashion (similar to the explorer folder list). Whenever a new indentation level is started, the subsequent nodes at this or a lower indentation level are shown as descendents of the preceding node. The following parameters can be used to configure the appearance of the tree:


  • The following standard attributes are recognized
Parameter Description Default
"name" or
Select a rendering theme none
title Required. This text serves as the root of the tree none
openAll If on, the tree is shown fully expanded. off
openTo Must be an integer. If present, the tree is expanded to the given node, as numbered from the root. 0
shared Must be a string. If present, the state of the tree is shared across all trees using this string. For example, if the tree is used in the WebLeftBar, the state will hold at all topics with this WebLeftBar. It's basically the name of the JavaScript object representing your tree. none
uselines Set to false if you don't want to show lines linking nodes and leafs in the tree true
useplusminus Set to false if you don't want to show '-' and '+' signs. One can use something like onclick='javascript: tree.o($index);' in the tree item to trigger opening/closing of a node. true
noindent Set to true to show children at the level of their parent. It suppresses children indentation. Enabling noindent will disable uselines and useplusminus. false
nocss Set to true to prevent inclusion of dtree.css. false
closesamelevel If true only one node within a parent can be expanded at the same time. openAll() and closeAll() functions do not work when this is enabled. false
noroot Prevents rendering of the title line. Useful if you don't want to show any title. false
warn Text to be displayed if no tree was found. none
style Name of the CSS file to include without the .css extension. The CSS file must be attached to this topic. dtree
autotoggle Set to on will enable node open/close when clicking the node item. Typically used for menu style tree along with noindent. off
nodeactions Defines node functionality in a comma separated list of HTML event and dTree function. Typically used for menu style tree along with noindent. Format:
<event> <function>[,...]
event is an HTML event e.g. onclick, ondblclick, onmouseover, onmouseout...
function is one of the three dTree functions: open, close, toggle
popup Set to on to enable pop-up menu mode. Typically used with closesamelevel. See pop-up menu example. off
closepopupdelay Pop-up mode only. Delay in millisecond before all popup close once the mouse cursor has left the menu structure. 1000
popupoffset Provides x and y offset from parent node for pop-up menus. Allows for fine tunning of pop-up position. 0,0
firstpopupoffset Provides x and y offset for first level pop-up menus. Introduce as a workaround for PatternSkin issues. 0,0
useopacity Used to generate extra dtreeTransluscentBackground div. Enables popup with translucent background and opaque text. off

Topic revision: r1 - 03 Sep 2015, GeorgeClark - This page was cached on 12 Mar 2018 - 15:19.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License