Difference between revisions of "Template:Country"

From OPENRESEARCH th copy Wiki
Jump to navigation Jump to search
(modified through wikirestore by Tim Holzheim)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>This template is used to automatically display relevant information about locations such as [[:Category:Country|cities]]. It has a single parameter "name" that can be used to change the text label used for the location. The default is to use the page name.
 
  
= Example =
+
<noinclude>
<nowiki>{{Country|name=Germany}}</nowiki>
+
This is the template {{Link|target=Template:Country|title=}}.
 +
It belongs to the concept/topic {{Link|target=:Concept:Country}}<br>
 +
You may find examples for the use of this template via the {{Link|target=List of Countries}}.
 +
=== Usage ===
 +
==== storemode subobject ====
 +
<pre>{{Country
 +
|Country name=
 +
|Country wikidataid=
 +
|storemode=subobject
 +
}}
 +
</pre>
 +
 
 +
==== storemode property ====
 +
<pre>{{Country
 +
|Country name=
 +
|Country wikidataid=
 +
|storemode=property
 +
}}
 +
</pre>
 +
 
 +
==== storemode none ====
 +
<pre>{{Country
 +
|Country name=
 +
|Country wikidataid=
 +
|storemode=none
 +
}}
 +
</pre>
 +
 
 +
 
 +
==== viewmode tableheader ====
 +
<pre>{{Country
 +
|Country name=
 +
|Country wikidataid=
 +
|viewmode=tableheader
 +
}}
 +
</pre>
 +
 
 +
==== viewmode tablerow ====
 +
<pre>{{Country
 +
|Country name=
 +
|Country wikidataid=
 +
|viewmode=tablerow
 +
}}
 +
</pre>
 +
 
 +
==== viewmode tablefooter ====
 +
<pre>{{Country
 +
|Country name=
 +
|Country wikidataid=
 +
|viewmode=tablefooter
 +
}}
 +
</pre>
 +
 
 +
==== viewmode labelfield ====
 +
<pre>{{Country
 +
|Country name=
 +
|Country wikidataid=
 +
|viewmode=labelfield
 +
}}
 +
</pre>
 +
 
 +
=== Source ===
 +
Click on "Edit" to edit the noinclude-part Source of this Template.
 
[[Category:Template]]
 
[[Category:Template]]
  
 
</noinclude>
 
</noinclude>
 +
 
<includeonly>
 
<includeonly>
{{#ask: [[Has location country::{{PAGENAME}}]]
+
{{#switch: {{{storemode|}}}
| ?Has location country=
+
|none=
| intro={{PAGENAME}} is located in&nbsp;
+
|subobject= {{#subobject:-
| searchlabel=  
+
|isA=Country|Country name={{{Country name|}}}
| mainlabel=-
+
|Country wikidataid={{{Country wikidataid|}}}
| limit=1
 
 
}}
 
}}
 +
|#default= {{#set:
 +
|isA=Country|Country name={{{Country name|}}}
 +
|Country wikidataid={{{Country wikidataid|}}}
 +
}}
 +
}}
 +
{{#switch: {{{viewmode|}}}
 +
|hidden=
 +
|masterdetail=
 +
|tableheader= {{{!}} class='wikitable'
 +
!Country name!!Country wikidataid{{!}}-
 +
|tablerow=
 +
|tablefooter={{!}}}
 +
|labelfield=Country name={{#if:{{{Country name|}}}|{{{Country name|}}}|}}<br>Country wikidataid={{#if:{{{Country wikidataid|}}}|{{{Country wikidataid|}}}|}}<br>
 +
|#default={{{!}} class='wikitable'
 +
! colspan='2' {{!}}Country
 +
{{!}}-
 +
{{#switch:{{{storemode|}}} }}
 +
|property= ! colspan='2' style='text-align:left' {{!}} {{Icon|name=edit|size=24}}{{Link|target=Special:FormEdit//{{FULLPAGENAME}}|title=edit}}
 +
{{!}}-
 +
}}
 +
!Country name
 +
{{!}}&nbsp;{{#if:{{{Country name|}}}|{{{Country name|}}}|}}
 +
{{!}}-
 +
!Country wikidataid
 +
{{!}}&nbsp;{{#if:{{{Country wikidataid|}}}|{{{Country wikidataid|}}}|}}
 +
{{!}}-
  
 
 
''The following information is automatically gathered from the contents of {{SITENAME}}. To add or remove entries, create or edit the respective pages.''<!--
 
 
-->{{#ask: [[located in::{{PAGENAME}}]] [[Category:Event]]
 
| sort=start date
 
| order=descending
 
| intro=<h3>Events</h3>
 
}}<!--
 
-->{{#ask: [[located in::{{PAGENAME}}]] [[Category:Organization]]
 
| intro=<h3>Organizations and Institutions</h3>
 
 
}}
 
}}
[[isA::Country]]
+
{{!}}}
[[Category:Country]]
+
[[Category:Country]]{{#default_form:Country }}</includeonly>
</includeonly>
 

Latest revision as of 23:58, 24 March 2021


This is the template Template:Country. It belongs to the concept/topic Concept:Country
You may find examples for the use of this template via the List of Countries.

Usage

storemode subobject

{{Country
|Country name=
|Country wikidataid=
|storemode=subobject
}}

storemode property

{{Country
|Country name=
|Country wikidataid=
|storemode=property
}}

storemode none

{{Country
|Country name=
|Country wikidataid=
|storemode=none
}}


viewmode tableheader

{{Country
|Country name=
|Country wikidataid=
|viewmode=tableheader
}}

viewmode tablerow

{{Country
|Country name=
|Country wikidataid=
|viewmode=tablerow
}}

viewmode tablefooter

{{Country
|Country name=
|Country wikidataid=
|viewmode=tablefooter
}}

viewmode labelfield

{{Country
|Country name=
|Country wikidataid=
|viewmode=labelfield
}}

Source

Click on "Edit" to edit the noinclude-part Source of this Template.