Difference between revisions of "Template:Category tree both"

From blackwiki
Jump to navigation Jump to search
imported>84user
 
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 1: Line 1:
{{category tree all|mode=parents|alignright=yes|{{{1|{{PAGENAME}}}}}}} {{category tree all|{{{1|{{PAGENAME}}}}}}}<noinclude>
+
{{category tree all|mode=parents|alignright=yes|{{{1|{{PAGENAME}}}}}}} {{category tree all|{{{1|{{PAGENAME}}}}}}}<!--
 +
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>
 
{{template doc}}</noinclude>
 
{{template doc}}</noinclude>

Revision as of 09:04, 25 October 2018

To display all parents click on the "►":
To display all subcategories click on the "►":
Category tree both(empty)
Template documentation[view] [edit] [history] [purge]

This navigation template displays two showable lists: subcategories at the left and parent categories at the right.

Usage

  • namespace = category
  • placement = lower, just above categories
  • usage-notes = This template takes one unnamed optional parameter (1). By default parameter 1 is "{{PAGENAME}}", which expands to the current page.

Syntax

  • Parameter 1 = optional (default is name of the category page it is placed on), name of root category for both trees. By default the name of the category page it is placed on is used. For example, {{Category tree both|Astronomy}} will make the browser render the template as two boxes, the left side showing subcategories of Astronomy, the right showing parents of Astronomy.

See also