Difference between revisions of "Template:Category tree"

From blackwiki
Jump to navigation Jump to search
imported>Alan Liefting
imported>PPEMES
(Clear enough?)
 
(9 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{tfd|Category tree}}
+
{| class="toc" {{#ifeq:{{{alignright|}}}|yes|align="right"}}
{| style="border: 1px solid #808080; padding: 5px;" {{#ifeq:{{{alignright|}}}|yes|align="right"}}
+
! Click on "" below to display subcategories:
|'''Click the "+" below to see all subcategories:'''
+
|-
{{#tag: categorytree| {{{1|{{PAGENAME}}}}} |depth=0}}
+
| {{#tag: categorytree| {{{1|{{PAGENAME}}}}}|depth={{{depth|0}}}}}<!--
|}<noinclude>
+
the following ifexist is just to add a backlink to the main category, so that the page using this template will show up in "What links here" from the category -->{{#ifexist:Category:{{{1|{{PAGENAME}}}}}}}
{{Documentation}}
+
|}<noinclude>{{Documentation}}<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --></noinclude>
<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS -->
 
</noinclude>
 

Latest revision as of 22:41, 22 July 2019

Click on "►" below to display subcategories:
50px Template documentation[view] [edit] [history] [purge]

Usage

Note that this template does not work as expected on either the mobile site or if users do not have JavaScript enabled. This affects about half of the readers at the English Wikipedia (as of 2016).

Syntax

Examples

{{Category tree|Films}} will create this box:

Click on "►" below to display subcategories:
Films

{{Category tree|Films about cats|depth=1}} will create this box:

Click on "►" below to display subcategories:
no subcategories

See also