Difference between revisions of "Template:Category tree all/doc"

From blackwiki
Jump to navigation Jump to search
imported>84user
imported>Koavf
m (→‎Syntax: replace template with Unicode character, replaced: {{ndash}} →  – (3) using AWB)
Line 6: Line 6:
  
 
====Syntax====
 
====Syntax====
* {{tlx|category tree all}}{{ndash}} basic form, uses the name of the category page it is placed on
+
* {{tlx|category tree all}} – basic form, uses the name of the category page it is placed on
* {{tlx|category tree all|<code>title</code>}}{{ndash}} uses <code>title</code> as the category page name
+
* {{tlx|category tree all|<code>title</code>}}&nbsp;– uses <code>title</code> as the category page name
* {{tlx|category tree all|2=mode=categories or pages or all or parents|3=depth=0, 1 or more|4=hideroot=on or off|5=showcount=on or off|7=header=user-defined header}}{{ndash}} uses more of the categorytree tag parameters (see http://www.mediawiki.org/wiki/Extension:CategoryTree for details):
+
* {{tlx|category tree all|2=mode=categories or pages or all or parents|3=depth=0, 1 or more|4=hideroot=on or off|5=showcount=on or off|7=header=user-defined header}}&nbsp;– uses more of the categorytree tag parameters (see http://www.mediawiki.org/wiki/Extension:CategoryTree for details):
 
** '''mode=pages''' displays only the pages in the category; '''mode=all''' displays subcategories, pages and images; '''mode=parents''' displays only the parent categories; mode is '''categories''' by default.
 
** '''mode=pages''' displays only the pages in the category; '''mode=all''' displays subcategories, pages and images; '''mode=parents''' displays only the parent categories; mode is '''categories''' by default.
 
** '''depth=1''' displays one level of the tree; '''depth=2''' displays two levels of the tree, and so forth; depth is '''0''' by default.
 
** '''depth=1''' displays one level of the tree; '''depth=2''' displays two levels of the tree, and so forth; depth is '''0''' by default.

Revision as of 22:24, 11 April 2010

Usage

This template displays a configurable showable list of subcategories, pages, images, or parent categories.

Syntax

  • {{category tree all}} – basic form, uses the name of the category page it is placed on
  • {{category tree all|title}} – uses title as the category page name
  • {{category tree all|mode=categories or pages or all or parents|depth=0, 1 or more|hideroot=on or off|showcount=on or off|header=user-defined header}} – uses more of the categorytree tag parameters (see http://www.mediawiki.org/wiki/Extension:CategoryTree for details):
    • mode=pages displays only the pages in the category; mode=all displays subcategories, pages and images; mode=parents displays only the parent categories; mode is categories by default.
    • depth=1 displays one level of the tree; depth=2 displays two levels of the tree, and so forth; depth is 0 by default.
    • hideroot=on hides the root category; hideroot is off by default.
    • showcount=off disables the (category, page, file) count after each category in the tree; showcount is on by default.
    • header=a user-defined header to override the default, for example "click + to show pages"

Examples

To display all subcategories click on the "►":
Astronomy education(empty)
  • {{category tree all|Astronomy education|showcount=off}} will create a box without numbers:
To display all subcategories click on the "►":
  • {{category tree all|Astronomy education|depth=1}} will create a box initially showing the tree to a depth of one:
To display all subcategories click on the "►":
Astronomy education(empty)
no subcategories
  • {{category tree all|Astronomy education|depth=2}} will create a box initially showing the tree to a depth of two:
To display all subcategories click on the "►":
Astronomy education(empty)
no subcategories
  • {{category tree all|Astronomy education|mode=parents|depth=1|hideroot=on}} will create this box:
To display all parents click on the "►":
  • {{category tree all|Astronomy education|mode=parents|depth=1|header=This is a user-defined header, click + to show parent categories:}} will create this box:
This is a user-defined header, click + to show parent categories:
no parent categories
  • {{category tree all|Astronomy education|depth=2|header=This is another user-defined header, click something}} will create this box:
This is another user-defined header, click something
Astronomy education(empty)
no subcategories

See also