Template:Country topics/doc: Difference between revisions

Content deleted Content added
CsDix (talk | contribs)
m more accurate titlebar
No edit summary
 
(40 intermediate revisions by 17 users not shown)
Line 1:
{{Documentation subpage}}
{{High-use}}
<!--Categories and interwikis go at the bottom of this page.-->
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[</nowiki>[[Wikipedia:Wikidata]]<nowiki>]]) -->
{{lua|Module:Check for unknown parameters|Module:Redirect}}
<div style="padding-bottom:1.5em;">
<!-----Navbox masquerading as empty version of Country topics template:----->
Line 6 ⟶ 8:
|name = {{PAGENAME}}
|bodyclass = hlist
|state=expanded
|title = ({{raise|1px|[[File:Sin bandera.svg|21px|alt=|link=]]}}) ''Name'' [topics]
|title = <!--({{raise|1px|[[File:Sin bandera.svg|21px|alt=|link=]]}}) -->''Name'' [topics]
|image = [[File:Sin escudo.svg|80px|alt=|link=]]<br/>{{small|(optional image)}}
|group1=History |list1=<nowiki>{{{history}}}</nowiki>
|above =
|group2=Geography |list2=<nowiki>{{{geography}}}</nowiki>
|group3=Politics |list3=<nowiki>{{{politics}}}</nowiki>
|group4=Economy |list4=<nowiki>{{{economy}}}</nowiki>
|group5=Culture |list5=<nowiki>{{{culture}}}</nowiki>
|below =
* (Outline)
* (Index)
* (Bibliography)
|group1=History |list1=<nowiki>{{{history}}}</nowiki>
 
|group2=Geography |list2=<nowiki>{{{geography}}}</nowiki>
* '''(<!--{{icon|Category}} -->Category)'''
|group3=Governance |list3=<nowiki>{{{governance}}}</nowiki>
* '''(<!--{{icon|Portal}} -->Portal)'''
|group4=Economy |list4=<nowiki>{{{economy}}}</nowiki>
|group5=Culture |list5=<nowiki>{{{culture}}}</nowiki>
|belowstyle = font-weight:bold;
|below =
* ({{icon|Book}} Book)
* ({{icon|Category}} Category)
* ([[File:Commons-logo.svg|15x15px|link=|alt=]] Commons)
* ({{icon|Portal}} Portal)
* ({{icon|WikiProject}} WikiProject)
}}
</div>
 
==Usage==
== Quick overview and example ==
Use this template to create a "''Name'' topics" template for the country{{\}}territory{{\}}region called ''Name''.
 
Use this template to create an "''Name'' topics" template (like those in e.g. [[:Category:Country and territory topics templates]]) for the country{{\}}territory{{\}}region called ''Name''.
 
To see how, it's probably easiest to look at one or more of the templates in one of the subcategories of [[:Category:Country and territory topics templates]],{{spaced e.g.ndash}} for instance, {{tl|Antigua and Barbuda topics}} {{smaller|(in [[:Category:Caribbean country and territory topics templates]])}}.
 
===Syntax===
Here, though, is a basic syntax where the area involved is a country. For a territory or region, the template's name and first parameter should be renamed accordingly (<code>{{((}}Territory topics</code> followed by <code>{{!}}territory = </code> otherwise <code>{{((}}Region topics</code> followed by <code>{{!}}region = </code>).
Below is a basic syntax. If the area involved isn't a country, the template's name and first parameter should be renamed accordingly, i.e. to&nbsp; <code>{{((}}Territory topics</code>&nbsp; followed by <code>{{!}}territory = ''Name''</code>;&nbsp; otherwise,&nbsp; <code>{{((}}Region topics</code>&nbsp; followed by <code>{{!}}region = ''Name''</code>&nbsp;.
 
<pre style="overflow:auto;">
{{Country topics
|country = <!--Country's name (the title of the Wikipedia article on that country)-->
|country =
|adjective = <!--demonym-->
 
|history = <!--Usually chronological:-->
Line 42 ⟶ 43:
* [[(second history link)]]
* [[(third history link)]]
<!--(etc.)-->
 
|geography = <!--Usually alphabetical:-->
Line 48 ⟶ 49:
* [[(second geography link)]]
* [[(third geography link)]]
<!--(etc.)-->
 
|governancepolitics = <!--Usually alphabetical:-->
* [[(first governancepolitics link)]]
* [[(second governancepolitics link)]]
* [[(third governancepolitics link)]]
<!--(etc.)-->
 
|economy = <!--Usually alphabetical:-->
Line 60 ⟶ 61:
* [[(second economy link)]]
* [[(third economy link)]]
<!--(etc.)-->
 
|culture = <!--Usually alphabetical:-->
Line 66 ⟶ 67:
* [[(second culture link)]]
* [[(third culture link)]]
<!--(etc.)-->
 
}}
</pre>
 
;With added fields
== Use ==
<pre style="overflow:auto;">
{{Country topics
|country =
|state =
|border =
|basestyle =
|titlename =
|titleclass =
|_notopicsword =
|prefix =
|image =
|imagestyle =
 
|above =
''Note: In the following, the word "place" is used instead of "country / territory / region [/ etc]" to keep the text's density manageable. "place", however, is not one of the parameters that can be used to specify the template's subject (see below).''
|abovestyle =
|custom1 =
|list1 =
 
|history =
This is a metatemplate for templates in categories such as [[:Category:Country and territory topics templates]]. It provides the layout that appears to have evolved for the majority of these templates, viz.
|custom2 =
:* A titlebar featuring a flag icon followed by the place's name followed by the word "topics";
|list2 =
 
|geography =
|subdivisions =
|subdivisions_link =
|custom3 =
|list3 =
 
|politics =
|politics_link =
|governance =
|governance_link =
|government =
|government_link =
|military =
|military_link =
|custom4 =
|list4 =
 
|economy =
|infrastructure =
|transport =
|custom5 =
|list5 =
 
|society =
|society_link =
|adjective =
|culture =
|demographics =
|religion =
|symbols =
|symbols_link =
|custom6 =
|list6 =
|custom7 =
|list7 =
|custom8 =
|list8 =
 
|below =
|belowstyle =
|_nobelow =
|addtobelow =
}}
</pre>
 
It's possible to add, remove or amend various features of the template (e.g. suppress the appearance of a flag in the titlebar). What and how is described in the rest of the documentation.
 
Because this is a metatemplate for templates in categories such as [[:Category:Country and territory topics templates]], it provides the layout that appears to have evolved for the majority of these templates:
:* A titlebar featuring a flag icon followed by a country or area's name followed by the word "topics";
<!----------
:* A line between the template's titlebar and main body (the "above" line) that carries a link or links to an outline and/or index article;
----------->
:* Five fundamental topic areas: History, Geography, Governance, Economy, Culture;
:* Five fundamental topic areas: History, Geography, Politics, Economy, Culture;
:* A line below the template's main body (the "below" line) that carries a link or links to a [[Wikibooks|Wikibook]], Wikipedia category, [[Wikimedia Commons|Commons]] category, [[Wikipedia:Portal|portal]] and/or [[Wikipedia:WikiProject|WikiProject]].
:* A line below the template's main body (the "below" line) that carries a link or links to a Wikipedia category, index article, outline article, or [[Wikipedia:Portal|portal]].
Although standardized, much of the above can be customized via the template's parameters.
 
== =Parameters ===
 
Most common parameters shown in '''''bold italics'''''.
 
{| class="wikitable sortable" style="cellpadding:0.1em;text-align:center;line-height:1.3em;font-size:95%;"
!style="width:6.5em;line-height:1.2em;text-align:center;font-size:75%;font-weight:normal;"| Order of<br/>appearance<br/>in template<br/>code
! Parameter name
Line 92 ⟶ 159:
|-
| 1 || ''template_name''
|align="left"| Occasionally, the template's name won't necessarily match its title, e.g. the name "Burma (Myanmar) topics" for a template whose title is "Burma topics". In these cases, use ''template_name'' to ensure the "<span style="font-variant:smallcaps;fontsmall-size:85%caps;">"V•T•E"v•t•e</span>" links on the lefthand side of the template's titlebar operate correctly.
: <code><nowiki>&nbsp;|template_name = Burma (Myanmar) topics</nowiki><br/><nowiki>(|country = Burma)</nowiki></code>
|-
Line 114 ⟶ 181:
|-
| 6 || ''flagname''
|align="left"| Use to provide the name of the place's flag if it doesn't match the default "Flag of [place]''Name''". This is usually due to prefixes/suffixes in the place's name such as "T/the" ("the Bahamas", "The Gambia", etc.).
: <code><nowiki>|flagname = Flag of the Bahamas</nowiki></code>
|-
Line 122 ⟶ 189:
|-
| 8 || ''flagsize''<br/>''flagvariant''
|align="left"| Use to alter the size or variant of the flag icon from the default settings (see {{tl|flagiconflag icon}}).
|-
| 9 || ''titlename''
Line 142 ⟶ 209:
|align="left"| Optional further CSS styling for the template's "above" line (between the template's titlebar and main body).
|-
<!----------
| 14 || ''_noabove''
| || ''_noabove''
|align="left"| Set to anything (usually "yes") to suppress the appearance of the "above" line.
|-
----------->
| 15 || ''above''
| 14 || ''above''
|align="left"| For a custom "above" line, i.e. carrying something other than an outline and/or index link.
|align="left"| To add an "above" line (as with a standard Navbox).
: <code><nowiki>|above = Capital: [[Hefei]]</nowiki></code>
|-
<!----------
| 16 || ''addtoabove''
| || ''addtoabove''
|align="left"| To add (further) links to the "above" line, especially if there's only one or two articles on a particular topic area.
: <code><nowiki>|addtoabove =</nowiki><br/><!--
--> &nbsp;<nowiki>* [[History of [Place]|History]]</nowiki></code>{{nbsp|3}}{{smaller|(if e.g. not enough links to merit a ''history'' entry)}}<br/><code><!--
--> &nbsp;<nowiki>* [[Territorial dispute over [Place]|Territorial dispute]]</nowiki></code>
----------->
|-
| 1715 || '''''history'''''
|align="left"| For a list or lists<sup>a</sup> of links addressing the place's history. See [[Special:WhatLinksHere/Template:Country topics|where this template occurs in Wikipedia]] for examples.
|-
| 1816 || ''custom1''<br/>''list1''
|align="left"| For a custom-named (''custom1'') list (''list1'') after the list of history topics (if provided) and before anything else.
|-
| 1917 || '''''geography'''''<br/>(''subdivisions''<br/>(''subdivisions_link''))
|align="left"| For a list or lists<sup>a</sup> of links addressing the place's geography. See [[Special:WhatLinksHere/Template:Country topics|where this template occurs in Wikipedia]] for examples.<br/>''subdivisions'' can be used for a separate list of topics about the place's [[administrative division]]s. If, for the name "Subdivisions" preceding this list, the link "Administrative divisions of [placePlace]" doesn't exist or an alternative is desired, it can be given using ''subdivisions_link''.
: <code><nowiki>|subdivisions_link = Bhutan#Administrative divisions</nowiki></code>
|-
| 2018 || ''custom2''<br/>''list2''
|align="left"| For a custom-named (''custom2'') list (''list2'') after the list of geography (and/or subdivision) topics (if provided) and before anything else.
|-
| 2119 || '''''governancepolitics'''''<br/>(''governance_linkpolitics_link'')<br/>(''politicsgovernment''<br/>''military'')
|align="left"| For a list or lists<sup>a</sup> of links addressing the place's governancepolitics (politicsgovernment, governmentmilitary, etc.). See [[Special:WhatLinksHere/Template:Country topics|where this template occurs in Wikipedia]] for examples.<br/> As links named "GovernancePolitics of [placePlace]" don't tend to exist, ''governance_linkpolitics_link'' can be used to provide a link for the name "GovernancePolitics" that precedes the list.
: <code><nowiki>|governance_linkpolitics_link = Politics of Afghanistan</nowiki></code>
''politicsgovernment'' and ''military'' are provided if a separate list or lists of topics about the place's politicsgovernment and/or military (armed forces) are desired.
|-
| 2220 || ''custom3''<br/>''list3''
|align="left"| For a custom-named (''custom3'') list (''list3'') after the list of governancepolitics (and/or politicsgovernment/military) topics (if provided) and before anything else.
|-
| 2321 || '''''economy'''''<br/>(''infrastructure''<br/>''transport'')
|align="left"| For a list or lists<sup>a</sup> of links addressing the place's economy. See [[Special:WhatLinksHere/Template:Country topics|where this template occurs in Wikipedia]] for examples.<br/>''infrastructure'' and ''transport'' are provided if separate lists of topics about the place's [[infrastructure]] and/or transport are desired.
|-
| 2422 || ''custom4''<br/>''list4''
|align="left"| For a custom-named (''custom4'') list (''list4'') after the list of economy (and/or infrastructure) topics (if provided) and before anything else.
|-
| 2523 || '''''culture'''''<br/>(''society''<br/>(''adjective'',<br/>''society_link'')<br/>''demographics''<br/>''religion''<br/>''symbols''<br/>(''symbols_link''))
|align="left"| For a list or lists<sup>a</sup> of links addressing the place's culture. See [[Special:WhatLinksHere/Template:Country topics|where this template occurs in Wikipedia]] for examples.<br/>''society'', ''demographics'', ''religion'' and ''symbols'' are provided if a separate list or lists of topics about the place's social structure, demographics, religion and/or symbols are desired.<br/>If ''society'' is used, then, if the place has a society category at Wikipedia that's named using a preceding adjective (e.g. "Category:Italian society"), ''adjective'' can be used to link the group's name "Society" to that category.
: <code><nowiki>|adjective = Italian</nowiki></code>{{nbsp|5}}{{smaller|(producing the link <nowiki>[[Category:Italian society|Society]]</nowiki>)}}
Alternatively, ''society_link'' can be used to generate a relevant link, e.g.
: <code><nowiki>|society_link = Social history of England</nowiki></code>{{nbsp|5}}{{smaller|(producing the link <nowiki>[[Social history of England|Society]]</nowiki>)}}
Similarly, if ''symbols'' is used and the template is unable to link its group name "Symbols" to the relevant place{{spaced ndash}}or, if it can but an alternative link is desired{{spaced ndash}}then ''symbols_link'' can be used to generate a link.
: <code><nowiki>|symbols_link = Symbols of the United Kingdom, the Channel Islands and the Isle of Man#Bailiwick of Guernsey</nowiki></code>
|-
| 2624 || ''custom5''<br/>''list5''
|align="left"| For a custom-named (''custom5'') list (''list5'') after the list of culture/society/etc. topics (if provided) and before anything else.
|-
| 2725 || ''custom6''<br/>''list6''
|align="left"| For a custom-named (''custom6'') list (''list6'') after custom ''list5'' (if provided) and before custom ''list7'' (if provided) or the template's "below" line (if not suppressed).
|-
| 2826 || ''custom7''<br/>''list7''
|align="left"| For a custom-named (''custom7'') list (''list7'') after custom ''list6'' (if provided) and before the template's "below" line (if not suppressed).
|-
| 2927 || ''belowstyle''
|align="left"| Optional further CSS styling for the template's "below" line (below the template's main body).
|-
<!----------
| 30 || ''_nobelow''
| || ''_nobelow''
|align="left"| Set to anything (usually "yes") to suppress the appearance of the "below" line.
|-
----------->
| 31 || ''_commonslink''
<!----------
|align="left"| Set to "yes" (without speechmarks) to include a link in the "below" line to the [[Wikimedia Commons|Commons]] category with the same name as the place. This assumes that such a category exists.
| || ''addtobelow''
: <code><nowiki>|_commonslink = yes</nowiki></code>
|align="left"| To add (further) links to the "below" line that aren't already handled by the template<!-- but (ideally) follow the same pattern of <nowiki>"[icon] [[link]]"</nowiki>-- .
|-
| 32 || ''addtobelow''
|align="left"| To add (further) links to the "below" line that aren't already handled by the template buit (ideally) follow the same pattern of <nowiki>"[icon] [[link]]"</nowiki>.
: <code><nowiki>|addtobelow =</nowiki><br/><!--
--> &nbsp;<nowiki>* <!--{{icon|Book}} -- [[ [Place] by years]]</nowiki><br/><!--
--> &nbsp;<nowiki>* <!--{{icon|Category}} -- [[:Category:[Place] templates|[Place] templates]]</nowiki></code>
----------->
|-
|colspan="3" style="padding-left:0.5em;text-align:left;"| <sup>a</sup> Using e.g. <code><nowiki>{{</nowiki>[[:Template:Navbox|Navbox]]<nowiki> |subgroupchild |groupstyle=padding-left:0.5em;padding-right:0.5em;font-weight:normal; ...}}</nowiki></code>.
|}
 
== Tracking category ==
* {{clc|Pages using country topics with unknown parameters}}
 
{{Continent-based templates|state=expanded}}
<includeonly>
<!-- Categories and interwikis go here: -->
 
<includeonly>{{Sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Configurable area-topic templates]]
[[Category:Navigational box wrapper templates]]
[[Category:Templates that add a tracking category]]
 
}}</includeonly>