7 March 2007

From Organic Design wiki
Revision as of 12:07, 7 March 2007 by Nad (talk | contribs) (Tree-view component upgraded)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Warning.svg This is a blog item that needs to be converted to the new Bliki format


Tree-view component upgraded

The XmlWiki tree-view.php component has now been turned into a wrapper of the superior MediaWiki treeview.php version which can handle recusive transclusion and allows items within the tree to include tranclusion of other trees too. This new version is designed to work with any normal MediaWiki 1.6.x or later and has a page on the MediaWiki wiki at MW:Extension:Tree view.

Trees can be transcluded within other trees so we can define large trees from structures of smaller trees. Such a conglomerate trees are defined using the following syntax:

<div class=tree-view>
*Tree1
**Item1
***Sub item1
**{{:Tree2}}
**Item3
</div>

In this example, an article called Tree2 is transcluded as an item in Tree1. Tree2 is defined as a normal tree starting at root which can be used elsewhere in the normal way. The tree-view code matches nested trees and adjusts them to the appropriate depth for them to seemlessly integrate into single whole tree. The class and other attributes of sub-trees are ignored and the whole tree renders in accord with the attributes of the root tree.