Difference between revisions of "Template:History of Wales/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>PBS
(latest template namespace version)
imported>PBS
 
Line 1: Line 1:
{{Documentation subpage}}
+
{{{{#if:{{{bar|}}}|Navbox|Sidebar with collapsible lists}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
+
|name  = History of Wales
== Usage ==
+
|bodyclass = vcard
If this template is used without any [[Help:Template#Parameters|parameters]] in the format,
+
|wraplinks = true
<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code>, the sidebar displays down the right-hand side of the page as displayed above.
+
|title = {{#if:{{{bar|}}}
 +
|<!-- if bar -->[[History of Wales]]
 +
|<!-- else -->{{region history sidebar title
 +
  | country  = Wales
 +
  | image    = [[File:Welsh Dragon (Y Ddraig Goch).svg|100px|Red Dragon of Wales]] }}
 +
}}<!-- end if -->
  
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 [[#Additional parameters|§&nbsp;Additional parameters]] below. This is the format to use as a navbox at the bottom of an article.
+
| image    = {{#if:{{{bar|}}}| [[File:Welsh Dragon (Y Ddraig Goch).svg|100px|Red Dragon of Wales]]}}
  
:For example:
+
| listtitlestyle = background:#eee; text-align:center;
 +
| state = {{{state<includeonly>|collapsed</includeonly>}}}
  
<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|bar=yes}}</nowiki></code>
+
|{{#if:{{{bar|}}}|group1|list1title}} = Chronology
 
+
|list1=<div {{#if:{{{bar|}}}|class="hlist"|class="plainlist"}}>
:would display as:
+
*[[Prehistoric Wales]]
 
+
*[[Wales in the Roman era|In the Roman Era]]
{{{{BASEPAGENAME}}|bar=yes}}
+
*[[Wales in the Middle Ages|In the Middle Ages]] {{hlist|([[Wales in the Early Middle Ages|Early]]|[[Wales in the High Middle Ages|High]]|[[Wales in the Late Middle Ages|Late]])}}
 
+
*[[Wales in the Early Modern Era|In the Early Modern Era]]
If, as in the latter case above, <code>|bar=</code> is used set to any value, then the [[#Additional parameters|§&nbsp;Additional parameters]] section applies and the visibility parameters function as described. If <code>|bar=</code> is not used, then those parameters are ignored.
+
*[[Welsh settlement in the Americas|Settlement in the Americas]]
 
+
*[[Modern history of Wales|Modern History]]
== Additional parameters ==
+
</div>
{{collapsible option}}
+
|{{#if:{{{bar|}}}|group2|list2title}} = Kingdoms
 
+
|list2=<div {{#if:{{{bar|}}}|class="hlist"|class="plainlist"}}>
== See also ==
+
*[[Brycheiniog]]
*{{tlx|History of the United Kingdom}}
+
*[[Kingdom of Ceredigion|Ceredigion]]
*{{tlx|History of England}}
+
*[[Deheubarth]]
*{{tlx|History of Ireland}}
+
*[[Kingdom of Dyfed|Dyfed]]
*{{tlx|History of Scotland}}
+
*[[Ergyng]]
*{{tlx|History of Europe templates}}
+
*[[Kingdom of Gwent|Gwent]]
 
+
*[[Kingdom of Gwynedd|Gwynedd]]
<includeonly>{{sandbox other||
+
*[[Glywysing|Morgannwg]]
<!-- Categories below this line, please; interwikis at Wikidata -->
+
*[[Kingdom of Powys|Powys]] <small>([[Powys Wenwynwyn|Wenwynwyn]], [[Powys Fadog|Fadog]])</small>
[[Category:European history by nation navigational boxes|Wales]]
+
*[[Seisyllwg]]
[[Category:Wales templates]]
+
</div>
}}</includeonly>
+
|{{#if:{{{bar|}}}|group3|list3title}} = [[Culture of Wales|Welsh cultural history]]
 +
|list3=<div {{#if:{{{bar|}}}|class="hlist"|class="plainlist"}}>
 +
*[[History of the Welsh language]]
 +
*[[Music of Wales|Music]]
 +
*[[Welsh-language literature]]
 +
*[[Welsh literature in English|Literature in English]]
 +
</div>
 +
|belowstyle = {{#if:{{{bar|}}}|font-weight:bold}}
 +
|below = {{portal-inline|Wales|size=tiny}}
 +
}}<noinclude>
 +
{{documentation}}
 +
</noinclude>

Latest revision as of 11:59, 14 October 2017

Template:Region history sidebar title
Template documentation[view] [edit] [history] [purge]

Usage

If this template is used without any parameters in the format, {{History of Wales}}, the sidebar 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 § Additional parameters below. This is the format to use as a navbox at the bottom of an article.

For example:

{{History of Wales|bar=yes}}

would display as:

If, as in the latter case above, |bar= is set to any value, then the § Additional parameters section applies and the visibility parameters function as described. If |bar= is not used, then those parameters are ignored.

Additional parameters

Initial visibility: currently defaults to autocollapse

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

  • |state=collapsed: {{History of Wales|state=collapsed}} to show the template collapsed, i.e., hidden apart from its title bar
  • |state=expanded: {{History of Wales|state=expanded}} to show the template expanded, i.e., fully visible
  • |state=autocollapse: {{History of Wales|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