Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Category tree all/doc: Difference between revisions

Template page
 
m adapt examples for Commons
Line 17: Line 17:
====Examples====
====Examples====


* {{tlx|category tree all|<code>Films</code>}} will create this box:
* {{tlx|category tree all|<code>Films</code>}}
:will create this box:
{{category tree all|Films}}
{{category tree all|Films}}
{{clear}}
{{clear}}
{{-}}
{{-}}


* {{tlx|category tree all|2=showcount=off|<code>Films</code>}} will create a box without numbers:
* {{tlx|category tree all|2=showcount=off|<code>Films</code>}}
:will create a box without numbers:
{{category tree all|Films|showcount=off}}
{{category tree all|Films|showcount=off}}
{{clear}}
{{clear}}
{{-}}
{{-}}


* {{tlx|category tree all|<code>Films by date</code>|3=depth=0}} will create a box initially showing the root only:
* {{tlx|category tree all|<code>Films by country</code>|3=depth=0}}
{{category tree all|Films by date|depth=0}}
:will create a box initially showing the root only:
{{category tree all|Films by country|depth=0}}
{{clear}}
{{clear}}
{{-}}
{{-}}


* {{tlx|category tree all|<code>Films by date</code>|3=depth=1}} will create a box initially showing the tree to a depth of one:
* {{tlx|category tree all|<code>Films by country</code>|3=depth=1}}
{{category tree all|Films by date|depth=1}}
:will create a box initially showing the tree to a depth of one:
{{category tree all|Films by country|depth=1}}
{{clear}}
{{clear}}
{{-}}
{{-}}


* {{tlx|category tree all|<code>Astronomy education</code>|3=mode=categories|4=depth=2|5=hideroot=off|6=showcount=on}} will create a box initially showing the tree to a depth of two:
* {{tlx|category tree all|<code>Archaeoastronomy</code>|3=mode=categories|4=depth=2|5=hideroot=off|6=showcount=on}}
{{category tree all|Astronomy education|mode=categories|depth=2|hideroot=off|showcount=on}}
:will create a box initially showing the tree to a depth of two:
{{category tree all|Archaeoastronomy|mode=categories|depth=2|hideroot=off|showcount=on}}
{{clear}}
{{clear}}
{{-}}
{{-}}


* {{tlx|category tree all|<code>Astronomy</code>|3=mode=categories|5=depth=0|5=hideroot=off|6=showcount=on}} will create this box:
* {{tlx|category tree all|<code>Astronomy</code>|3=mode=categories|5=depth=0|5=hideroot=off|6=showcount=on}}
:will create this box:
{{category tree all|Astronomy|mode=categories|depth=0|hideroot=off|showcount=on}}
{{category tree all|Astronomy|mode=categories|depth=0|hideroot=off|showcount=on}}
{{clear}}
{{clear}}
{{-}}
{{-}}


* {{tlx|category tree all|<code>Astronomy</code>|3=mode=parents|4=depth=1|5=hideroot=on}} will create this box:
* {{tlx|category tree all|<code>Astronomy</code>|3=mode=parents|4=depth=1|5=hideroot=on}}
:will create this box:
{{category tree all|Astronomy|mode=parents|depth=1|hideroot=on}}
{{category tree all|Astronomy|mode=parents|depth=1|hideroot=on}}
{{clear}}
{{clear}}
{{-}}
{{-}}


* {{tlx|category tree all|<code>Astronomy</code>|3=mode=parents|4=depth=0|5=hideroot=off|7=header=''This is a user-defined header, click '''+''' to show parent categories:''}} will create this box:
* {{tlx|category tree all|<code>Astronomy</code>|3=mode=parents|4=depth=0|5=hideroot=off|7=header=''This is a user-defined header, click '''+''' to show parent categories:''}}
:will create this box:
{{category tree all|Astronomy|mode=parents|depth=0|hideroot=off|header=''This is a user-defined header, click '''+''' to show parent categories:''}}
{{category tree all|Astronomy|mode=parents|depth=0|hideroot=off|header=''This is a user-defined header, click '''+''' to show parent categories:''}}
{{clear}}
{{clear}}
{{-}}
{{-}}


* {{tlx|category tree all|<code>Astronomy education</code>|3=mode=categories|4=depth=2|5=hideroot=off|6=showcount=on|7=header=''This is another user-defined header, click something''|7=Astronomy education}} will create this box:
* {{tlx|category tree all|<code>Archaeoastronomy</code>|3=mode=categories|4=depth=2|5=hideroot=off|6=showcount=on|7=header=''This is another user-defined header, click something''|7=Astronomy education}}
{{category tree all|Astronomy education|mode=categories|depth=2|hideroot=off|showcount=on|header=This is a user-defined header, click something}}
:will create this box:
{{category tree all|Archaeoastronomy|mode=categories|depth=2|hideroot=off|showcount=on|header=This is a user-defined header, click something}}
{{clear}}
{{clear}}
{{-}}
{{-}}

Revision as of 17:20, 28 September 2009

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;
    • depth=0 displays only the root node, depth=1 displays one level of the tree and so forth;
    • hideroot=on hides the root category;
    • showcount=on displays the number of sub-subcategories after each subcategory.
    • header=a user-defined header to override the default, for example "click + to show pages"

Examples

will create this box:
To display all subcategories click on the "▶":
Category Films not found
will create a box without numbers:
To display all subcategories click on the "▶":
Category Films not found
will create a box initially showing the root only:
To display all subcategories click on the "▶":
Category Films by country not found
will create a box initially showing the tree to a depth of one:
To display all subcategories click on the "▶":
Category Films by country not found
  • {{category tree all|Archaeoastronomy|mode=categories|depth=2|hideroot=off|showcount=on}}
will create a box initially showing the tree to a depth of two:
To display all subcategories click on the "▶":
Category Archaeoastronomy not found
will create this box:
To display all subcategories click on the "▶":
Category Astronomy not found
will create this box:
To display all parents click on the "▶":
Category Astronomy not found
  • {{category tree all|Astronomy|mode=parents|depth=0|hideroot=off|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:
Category Astronomy not found
  • {{category tree all|Archaeoastronomy|mode=categories|depth=2|hideroot=off|showcount=on|Astronomy education}}
will create this box:
This is a user-defined header, click something
Category Archaeoastronomy not found

See also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.