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: Difference between revisions

Template page
No edit summary
No edit summary
Line 1: Line 1:
{| style="border: 1px solid #808080; padding: 5px;" {{#ifeq:{{{align right|}}}|yes|align="right"}}
{| style="border: 1px solid #808080; padding: 5px;" {{#ifeq:{{{align right|}}}|yes|align="right"}}
|{{{header|'''To display all {{#ifeq: {{{mode|categories}}} | categories | subcategories | }}{{#ifeq: {{{mode|}}} | pages | pages | }}{{#ifeq: {{{mode|}}} | all | pages, subcategories and images | }}{{#ifeq: {{{mode|}}} | parents | parents | }} click on the "▶":'''}}}
|{{{header|'''To display all {{#ifeq: {{{mode|categories}}} | categories | subcategories | }}{{#ifeq: {{{mode|}}} | pages | pages | }}{{#ifeq: {{{mode|}}} | all | pages, subcategories and images | }}{{#ifeq: {{{mode|}}} | parents | parents | }} click on the "▶
":'''}}}
{{#tag: category tree| {{{1|{{Page name}}}}} |mode={{{mode|}}} |depth={{{depth|0}}} |hideroot={{{hideroot|off}}} |showcount={{{show count|on}}} }}
{{#tag: category tree| {{{1|{{Page name}}}}} |mode={{{mode|}}} |depth={{{depth|0}}} |hideroot={{{hideroot|off}}} |showcount={{{show count|on}}} }}
|}<noinclude>
|}<noinclude>

Revision as of 22:29, 10 March 2026

To display all subcategories click on the "▶

": <category tree mode="" depth="0" hideroot="off" showcount="on"> Template:Page name </category tree>

Template documentation[ view · edit · history · purge ]
This documentation is transcluded from Template:Category tree all/doc.

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"
  • {{category tree all|alignright=yes}} - basic right-aligned form
  • {{category tree all|mode=categories or pages or all or parents|alignright=yes}} - right-aligned form with mode parameter

Examples

will create this box:
To display all subcategories click on the "▶

": <category tree mode="" depth="0" hideroot="off" showcount="on"> Films </category tree>

will create a box without numbers:
To display all subcategories click on the "▶

": <category tree mode="" depth="0" hideroot="off" showcount="on"> Films </category tree>

will create a box initially showing the root only:
To display all subcategories click on the "▶

": <category tree mode="" depth="0" hideroot="off" showcount="on"> Films by country </category tree>

will create a box initially showing the tree to a depth of one:
To display all subcategories click on the "▶

": <category tree mode="" depth="1" hideroot="off" showcount="on"> Films by country </category tree>

  • {{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 tree mode="categories" depth="2" hideroot="off" showcount="on"> Archaeoastronomy </category tree>

will create this box:
To display all subcategories click on the "▶

": <category tree mode="categories" depth="0" hideroot="off" showcount="on"> Astronomy </category tree>

will create this box:
To display all parents click on the "▶

": <category tree mode="parents" depth="1" hideroot="on" showcount="on"> Astronomy </category tree>

  • {{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 tree mode="parents" depth="0" hideroot="off" showcount="on"> Astronomy </category tree>

  • {{category tree all|Archaeoastronomy|mode=categories|depth=2|hideroot=off|showcount=on|header=This is another user-defined header, click something|Astronomy education}}
will create this box:
This is a user-defined header, click something

<category tree mode="categories" depth="2" hideroot="off" showcount="on"> Archaeoastronomy </category tree>

{{category tree all|Astronomy}}

will create these two boxes (next example uses {{Category tree both}} to do the same):
To display all parents click on the "▶

": <category tree mode="parents" depth="0" hideroot="off" showcount="on"> Astronomy </category tree>

To display all subcategories click on the "▶

": <category tree mode="" depth="0" hideroot="off" showcount="on"> Astronomy </category tree>

is an alternative way to create the same two boxes:

Template:Category tree both

See also


[[Category:Category navigational templates|Template:Pages name]]

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