Difference between revisions of "Template:Related"

From MCEWiki
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="border: 1px solid black; float: right"><div style="background: #DDD; text-align: center; font-weight: bold">Related pages:</div>{{#categorytree:{{{1}}}|style=padding-left: 1em; padding-right: 1em|mode=parents|hideroot}}{{#categorytree:{{{1}}}|style=padding-left: 1em; padding-right: 1em|mode=pages|showcount}}</div>
+
<div style="border: 1px solid black; float: right"><div style="background: #DDD; text-align: center; font-weight: bold">Related topics:</div>{{#categorytree:{{{1}}}|style=padding-left: 1em; padding-right: 1em|mode=parents|hideroot|depth=1}}{{#categorytree:{{{1}}}|style=padding-left: 1em; padding-right: 1em|mode=pages|showcount|depth={{{depth|1}}}}}</div><noinclude>
 +
== Documentation ==
 +
This template puts a drop-down category tree on the right side of the page.  To use it, add
 +
 
 +
&#123;&#123;Related|CATEGORY_NAME}}
 +
 
 +
at the top of the page.  For example:
 +
 
 +
&#123;&#123;Related|Accessories}}
 +
 
 +
produces:
 +
{{Related|Accessories}}
 +
<br clear="all"/>
 +
 
 +
To make the list initially collapsed add <tt>depth=0</tt> to the template:
 +
&#123;&#123;Related|Accessories|depth=0}}
 +
 
 +
produces:
 +
{{Related|Accessories|depth=0}}
 +
</noinclude>

Latest revision as of 19:34, 31 August 2016

Related topics:

Documentation

This template puts a drop-down category tree on the right side of the page. To use it, add

{{Related|CATEGORY_NAME}}

at the top of the page. For example:

{{Related|Accessories}}

produces:


To make the list initially collapsed add depth=0 to the template:

{{Related|Accessories|depth=0}}

produces:

Related topics:
Accessories(1 C, 10 P)