Difference between revisions of "Template:Category tree all"

From blackwiki
Jump to navigation Jump to search
(doesn't have to be "yes" -- cell padding -- default message)
(switch should work)
Line 1: Line 1:
 
{| class="toc" style="{{#ifeq:{{{alignright|}}}|float:right;}} {{#ifeq:{{{rounded|}}}|{{border-radius|10px}}}} width:{{{width}}}"
 
{| class="toc" style="{{#ifeq:{{{alignright|}}}|float:right;}} {{#ifeq:{{{rounded|}}}|{{border-radius|10px}}}} width:{{{width}}}"
!style="padding-left:0.5em;padding-right:0.5em;"| {{{header|Click the "►" to reveal the {{#ifeq: {{{mode|categories}}} | categories | subcategories | }}{{#ifeq: {{{mode|}}} | pages | pages | }}{{#ifeq: {{{mode|}}} | all | pages, subcategories and images | }}{{#ifeq: {{{mode|}}} | parents | parents | }} }}}
+
!style="padding-left:0.5em;padding-right:0.5em;"| {{{header|Click the "►" to reveal the {{#switch:{{{mode}}} |pages=pages |all=pages, subcategories and images |parents=parents |subcategories}} }}}
 
|-
 
|-
|style="padding-left:0.5em;padding-right:0.5em;"| {{#tag: categorytree| {{{1|{{PAGENAME}}}}} |mode={{{mode|}}} |depth={{{depth|0}}} |hideroot={{{hideroot|off}}} |showcount={{{showcount|on}}} }}
+
|style="padding-left:0.5em;padding-right:0.5em;"| {{#tag:categorytree |{{{1|{{PAGENAME}}}}} |mode={{{mode|}}} |depth={{{depth|0}}} |hideroot={{{hideroot|off}}} |showcount={{{showcount|on}}} }}
 
|}<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 21:48, 1 February 2015

Click the "►" to reveal the subcategories
Category tree all(empty)
Template documentation[view] [edit] [history] [purge]

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; 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}}

Click the "►" to reveal the pages, subcategories and images
Health(empty)
Subcategories

Code: {{category tree all|Health}}

Click the "►" to reveal the subcategories
Health(empty)
Parent categories

Code: {{category tree all|Health|mode=parents}}

Click the "►" to reveal the parents
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)
Health(empty)

|>

See also

la:Formula:Category tree all pt:Predefinição:Árvore de todas categorias ur:سانچہ:Category tree all