This is your site for solutions. Please contribute your knowledge, leave a note, support Appropedia or let the world know about this resource.

Help:CategoryTree

From Appropedia

Jump to: navigation, search

See http://www.mediawiki.org/wiki/Extension:CategoryTree.

[edit] Usage

CategoryTree can be used in three ways:

  1. directly on the category pages
  2. as a "custom tag" to show a category structure in-line on a wiki page
  3. and as a special page.

The CategoryTree extension adds [+] "expand" widgets to the subcategories listed on category pages. If Javascript is disabled, those widgets just do nothing.

[edit] The <categorytree> tag

The custom tag is called <categorytree>. For example, if you put <categorytree>Foo</categorytree> on a wiki page, it will show the contents of category Foo as a dynamic tree on that page (see examples). The tag accepts the following attributes, using a HTML-like syntax:

mode
can be "categories", "pages" or "all". The default for this attribute is set to "categories".
depth
determines how many levels of the tree are shown initially. Default is 1, 0 means only the root node. The maximum value depends on the mode specified, and on the $wgCategoryTreeMaxDepth option. note: depth values greater than 1 do not (yet) work with $wgCategoryTreeDynamicTag enabled!
onlyroot
set this to "on" to only show the "root" node of the tree initially. Equivalent to depth="0". Deprecated USE depth="0"
hideroot
set this to "on" to hide the "root" node of the tree, i.e. the mention of category Foo from the example.
style
can be used to specify any CSS styles you would like for the tree.

[edit] Examples


 Oil
Personal tools