Difference between revisions of "Template:Category tree all"
Jump to navigation
Jump to search
imported>Primefac m (Protected "Template:Category tree all": semi-protecting highly-visible templates in response to recent template-space vandalism ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed acce...) |
imported>Fayenatic london (<!-- 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:{{PAGENAME}}}}) |
||
| Line 2: | Line 2: | ||
! {{{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: categorytree| {{{1|{{PAGENAME}}}}} |mode={{{mode|}}} |depth={{{depth|0}}} |hideroot={{{hideroot|off}}} |showcount={{{showcount|on}}} }} | + | | {{#tag: categorytree| {{{1|{{PAGENAME}}}}} |mode={{{mode|}}} |depth={{{depth|0}}} |hideroot={{{hideroot|off}}} |showcount={{{showcount|on}}} }}<!-- |
| + | 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:{{PAGENAME}}}} | ||
|}<noinclude>{{Documentation}}<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --></noinclude> | |}<noinclude>{{Documentation}}<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --></noinclude> | ||
Revision as of 08:58, 25 October 2018
| To display all subcategories click on the "►": |
|---|
Contents
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|– usestitle}}titleas 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; mode is categories by default.
- depth=1 displays one level of the tree; depth=2 displays two levels of the tree, and so forth; depth is 0 by default.
- hideroot=on hides the root category; hideroot is off by default.
- showcount=off disables the (category, page, file) count after each category in the tree; showcount is on by default.
- header=a user-defined header to override the default, for example "click + to show pages"
Examples
Subcategories, pages and images
Code: {{category tree all|Health|mode=all}}
| To display all pages, subcategories and images click on the "►": |
|---|
Subcategories
Code: {{category tree all|Health}}
| To display all subcategories click on the "►": |
|---|
Parent categories
Code: {{category tree all|Health|mode=parents}}
| To display all parents click on the "►": |
|---|
► Health |
Header
Code: {{category tree all|Health|mode=parents|header=Breadcrumb (start point)} ... {{category tree all|Health|mode=parents|header=Breadcrumb (finish point)}
>|
| Breadcrumb (start point) |
|---|
► Health |
|-You are here: "Health"
| Breadcrumb (finish point) |
|---|
|>
See also
- {{category tree}}
- {{Category tree both}}
- mw:Extension:CategoryTree
- commons:Template:Category tree all - {{category tree all}} ported to Wikimedia Commons
- commons:Template:Category tree
la:Formula:Category tree all pt:Predefinição:Árvore de todas categorias ur:سانچہ:Category tree all
| The above documentation is transcluded from Template:Category tree all/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |