Template:Category tree all/doc: Difference between revisions
Template page
More actions
m ported from en:Template:Category tree all/doc |
m 10 revisions imported |
||
| (9 intermediate revisions by 4 users not shown) | |||
| Line 14: | Line 14: | ||
** showcount=on displays the number of sub-subcategories after each subcategory. | ** 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" | ** header=a user-defined header to override the default, for example "click '''+''' to show pages" | ||
* {{tlx|category tree all|8=alignright=yes}} - basic right-aligned form | |||
* {{tlx|category tree all|2=mode=categories or pages or all or parents|8=alignright=yes}} - right-aligned form with mode parameter | |||
====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 | * {{tlx|category tree all|<code>Films</code>|3=showcount=off}} | ||
: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 | * {{tlx|category tree all|<code>Films by country</code>|3=depth=0}} | ||
{{category tree all|Films by | :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 | * {{tlx|category tree all|<code>Films by country</code>|3=depth=1}} | ||
{{category tree all|Films by | :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> | * {{tlx|category tree all|<code>Archaeoastronomy</code>|3=mode=categories|4=depth=2|5=hideroot=off|6=showcount=on}} | ||
{{category tree all| | :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| | * {{tlx|category tree all|<code>Astronomy</code>|3=mode=categories|4=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> | * {{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''|8=Astronomy education}} | ||
{{category tree all| | :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}} | ||
{{-}} | {{-}} | ||
* {{tlx|category tree all|2=Astronomy|3=mode=parents|8=alignright=yes}} | |||
{{tlx|category tree all|2=Astronomy}} | |||
:will create these two boxes (next example uses {{tl|category tree both}} to do the same): | |||
{{category tree all|Astronomy|mode=parents|alignright=yes}} | |||
{{category tree all|Astronomy}} | |||
{{clear}}{{-}} | |||
* {{tlx|category tree both|2=Astronomy}} | |||
:is an alternative way to create the same two boxes: | |||
{{category tree both|Astronomy}} | |||
{{clear}}{{-}} | |||
=== See also === | === See also === | ||
* {{tl|category tree both}} - includes both subcategories and parent categories | |||
* {{tl|category tree}} - simpler template that shows subcategories only | * {{tl|category tree}} - simpler template that shows subcategories only | ||
* [[mw:Extension:CategoryTree]] | * [[mw:Extension:CategoryTree]] | ||