Difference between revisions of "Template:History of England/doc"

From blackwiki
Jump to navigation Jump to search
imported>Geekdiva
m (→‎See also: Added missing bullet and an infobox.)
imported>Geekdiva
(Added code & example for |bar=. Misc improvements to flow and wording.)
Line 3: Line 3:
  
 
== Usage ==
 
== Usage ==
If this template is used with out any parameters it displays down the right-hand side of the page (as displayed above).
+
If this template is used with out any parameters, it displays down the right-hand side of the page (as displayed above).
  
If a parameter <code>bar=</code> is set to any value then the template displays as a bar across the page. This is the format to use when the intention is to use the template at the bottom of an article.  
+
If the parameter <code>|bar=</code> is set to any value, then the template displays as a bar or box across the width of the page, depending on the use of the parameters in [[#Initial visibility|§&nbsp;Initial visibility]] below. This is the format to use as a navbox at the bottom of an article.
 +
 
 +
:For example:
 +
 
 +
<code><nowiki>{{History of England|bar=yes}}</nowiki></code>
 +
 
 +
:would display as:
 +
 
 +
{{History of England|bar=yes}}
 +
 
 +
If <code>|bar=</code> is used (for example, <code>|bar=yes</code>) then the following section applies and the visibility parameters function as described. If <code>|bar=</code> is not used then the following section's parameters are ignored.
  
If bar is set e.g.: <code>bar=''yes''</code> then the following applies and the additional parameters are interpreted as described (if <code>bar=</code> is not set then the following additional parameters are ignored):
 
 
{{collapsible option}}
 
{{collapsible option}}
  
Line 13: Line 22:
 
* [[:Category:United Kingdom templates]]  
 
* [[:Category:United Kingdom templates]]  
  
{{History of Europe templates}}
+
{{History of Europe templates|state=collapsed}}
  
 
<includeonly>
 
<includeonly>

Revision as of 01:16, 26 March 2017

Usage

If this template is used with out any parameters, it displays down the right-hand side of the page (as displayed above).

If the parameter |bar= is set to any value, then the template displays as a bar or box across the width of the page, depending on the use of the parameters in § Initial visibility below. This is the format to use as a navbox at the bottom of an article.

For example:

{{History of England|bar=yes}}

would display as:

If |bar= is used (for example, |bar=yes) then the following section applies and the visibility parameters function as described. If |bar= is not used then the following section's parameters are ignored.

Initial visibility: currently defaults to autocollapse

To set this template's initial visibility, the |state= parameter may be used:

  • |state=collapsed: {{History of England|state=collapsed}} to show the template collapsed, i.e., hidden apart from its title bar
  • |state=expanded: {{History of England|state=expanded}} to show the template expanded, i.e., fully visible
  • |state=autocollapse: {{History of England|state=autocollapse}}
    • shows the template collapsed to the title bar if there is a {{navbar}}, a {{sidebar}}, or some other table on the page with the collapsible attribute
    • shows the template in its expanded state if there are no other collapsible items on the page

If the |state= parameter in the template on this page is not set, the template's initial visibility is taken from the |default= parameter in the Collapsible option template. For the template on this page, that currently evaluates to autocollapse.

See also