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

From blackwiki
Jump to navigation Jump to search
imported>Michael Bednarek
m (Undid revision 616338846 by Мезя69 (talk): rv Russian text.)
imported>GhostInTheMachine
(Add details for "alignright" and "depth")
 
(11 intermediate revisions by 9 users not shown)
Line 2: Line 2:
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
__NOTOC__
 
__NOTOC__
=== Usage ===
+
===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====
 
====Syntax====
* {{tlx|Category tree}}&nbsp;– basic form, uses the name of the category page it is placed on
+
* {{tlx|Category tree}} – basic form, uses the name of the category page it is placed on
* {{tlx|Category tree|<code>title</code>}}&nbsp;– uses <code>title</code> as the category page name
+
* {{tlx|Category tree|title}} – uses the [[Help:Template#parameters|unnamed parameter]] <code>title</code> as the category name to be displayed
 +
* {{tlx|Category tree|alignright{{=}}yes}} – align to the right
 +
* {{tlx|Category tree|depth{{=}}2}} – display the tree already opened to 2 levels
  
====Example====
+
====Examples====
* {{tlx|Category tree|<code>Films</code>}} will create this box:
+
 
 +
{{tlx|Category tree|Films}} will create this box:
 
{{category tree|Films}}
 
{{category tree|Films}}
{{clear}}
+
 
{{-}}
+
{{tlx|Category tree|Films about cats|depth{{=}}1}} will create this box:
 +
{{category tree|Films about cats|depth=1}}
  
 
===See also===
 
===See also===
* {{tl|Category tree all}} &nbsp;– version that lets the user configure the appearance
+
* {{tl|Category tree all}} – version that lets the user configure the appearance
 +
* {{tl|Category tree both}} – displays two showable lists: subcategories at the left and parent categories at the right
 
* [[mw:Extension:CategoryTree]]
 
* [[mw:Extension:CategoryTree]]
 
* [[commons:Template:Category tree]]
 
* [[commons:Template:Category tree]]
  
<includeonly><!-- CATEGORIES ONLY HERE, THANKS -->
+
<includeonly>{{Sandbox other||<!-- CATEGORIES ONLY HERE, THANKS -->
 
[[Category:Category namespace templates]]
 
[[Category:Category namespace templates]]
  
</includeonly>
+
}}</includeonly>

Latest revision as of 12:09, 4 September 2020

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