Difference between revisions of "Template:Country"

From OPENRESEARCH th copy Wiki
Jump to navigation Jump to search
(modified through wikirestore by Tim Holzheim)
 
(5 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>
{{Country|name=Germany}}
+
This is the template {{Link|target=Template:Country|title=}}.
[[Category:Template]]
+
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>
  
</noinclude>
+
==== viewmode tablefooter ====
<includeonly>
+
<pre>{{Country
{{#ask: [[Has location country::{{PAGENAME}}]]
+
|Country name=
| ?Has location country=
+
|Country wikidataid=
| intro={{PAGENAME}} is located in&nbsp;
+
|viewmode=tablefooter
| searchlabel=  
 
| mainlabel=-
 
| limit=1
 
 
}}
 
}}
 +
</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]]
  
''The following information is automatically gathered from the contents of {{SITENAME}}. To add or remove entries, create or edit the respective pages.''<!--
+
</noinclude>
  
-->{{#ask: [[located in::{{PAGENAME}}]] [[Category:Event]]
+
<includeonly>
| sort=start date
+
{{#switch: {{{storemode|}}}
| order=descending
+
|none=
| intro=<h3>Events</h3>
+
|subobject= {{#subobject:-
}}<!--
+
|isA=Country|Country name={{{Country name|}}}
-->{{#ask: [[located in::{{PAGENAME}}]] [[Category:Organization]]
+
|Country wikidataid={{{Country wikidataid|}}}
| intro=<h3>Organizations and Institutions</h3>
 
 
}}
 
}}
 +
|#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|}}}|}}
 +
{{!}}-
  
[[Category:Country]]
+
}}
</includeonly>
+
{{!}}}
 +
[[Category:Country]]{{#default_form:Country }}</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.