Difference between revisions of "Template:Region"

From eRepublik Official Wiki
Jump to: navigation, search
(added option to add several resources, documentation page created)
(2 intermediate revisions by the same user not shown)
Line 30: Line 30:
 
{| style="width:225px;"
 
{| style="width:225px;"
 
{{HeaderV2|Productivity}}
 
{{HeaderV2|Productivity}}
{{RowV2|Resource(s)|{{#if: {{{resource|}}} | [[File:Icon_-_{{{resource}}}.png|link={{{resource}}}|40px]] }} {{#if: {{{resource1|}}} | [[File:Icon_-_{{{resource1}}}.png|link={{{resource1}}}|40px]] | ''None'' }} {{#if: {{{resource2|}}} | [[File:Icon_-_{{{resource2}}}.png|link={{{resource2}}}|40px]] }} {{#if: {{{resource4|}}} | <br/> }} {{#if: {{{resource3|}}} | [[File:Icon_-_{{{resource3}}}.png|link={{{resource3}}}|40px]] }} {{#if: {{{resource4|}}} | [[File:Icon_-_{{{resource4}}}.png|link={{{resource4}}}|40px]] }} }}
+
{{RowV2|Resource(s)|{{#if: {{{resource|}}} | [[File:Icon_-_{{{resource}}}.png|link={{{resource}}}|40px]] }} {{#if: {{{resource1|}}} | [[File:Icon_-_{{{resource1}}}.png|link={{{resource1}}}|40px]] | {{#if: {{{resource}}}||''None''}} }} {{#if: {{{resource2|}}} | [[File:Icon_-_{{{resource2}}}.png|link={{{resource2}}}|40px]] }} {{#if: {{{resource4|}}} | <br/> }} {{#if: {{{resource3|}}} | [[File:Icon_-_{{{resource3}}}.png|link={{{resource3}}}|40px]] }} {{#if: {{{resource4|}}} | [[File:Icon_-_{{{resource4}}}.png|link={{{resource4}}}|40px]] }} }}
 
|}
 
|}
  
Line 40: Line 40:
 
{{#ifeq: {{NAMESPACE}}||
 
{{#ifeq: {{NAMESPACE}}||
 
{{#ifeq: {{Regions/Owners|{{BASEPAGENAME}}}}|FAIL||[[Category:Regions of {{Regions/Owners|{{BASEPAGENAME}}}}]]}}
 
{{#ifeq: {{Regions/Owners|{{BASEPAGENAME}}}}|FAIL||[[Category:Regions of {{Regions/Owners|{{BASEPAGENAME}}}}]]}}
{{#if:{{{resource1|}}}|[[Category:Regions with {{{resource1|}}}]]|{{#ifeq: {{Region/SwitchRaw|{{{name|}}}}}|FAIL|[[Category:Regions with unassociated resource]]|[[Category:Regions with {{Region/SwitchRaw|{{{name|}}}}}]]}}}}{{#if:{{{resource2|}}}|[[Category:Regions with {{{resource2|}}}]]|{{#ifeq: {{Region/SwitchRaw|{{{name|}}}}}|FAIL|[[Category:Regions with unassociated resource]]|[[Category:Regions with {{Region/SwitchRaw|{{{name|}}}}}]]}}}}{{#if:{{{resource3|}}}|[[Category:Regions with {{{resource3|}}}]]|{{#ifeq: {{Region/SwitchRaw|{{{name|}}}}}|FAIL|[[Category:Regions with unassociated resource]]|[[Category:Regions with {{Region/SwitchRaw|{{{name|}}}}}]]}}}}{{#if:{{{resource4|}}}|[[Category:Regions with {{{resource4|}}}]]|{{#ifeq: {{Region/SwitchRaw|{{{name|}}}}}|FAIL|[[Category:Regions with unassociated resource]]|[[Category:Regions with {{Region/SwitchRaw|{{{name|}}}}}]]}}}}{{#if:{{{resource1|None}}}|[[Category:Regions with no resource]]}}
+
{{#if:{{{resource|}}}|[[Category:Regions with {{{resource|}}}]]|{{#ifeq: {{Region/SwitchRaw|{{{name|}}}}}|FAIL|[[Category:Regions with unassociated resource]]|[[Category:Regions with {{Region/SwitchRaw|{{{name|}}}}}]]}}}}{{#if:{{{resource1|}}}|[[Category:Regions with {{{resource1|}}}]]|{{#ifeq: {{Region/SwitchRaw|{{{name|}}}}}|FAIL|[[Category:Regions with unassociated resource]]|[[Category:Regions with {{Region/SwitchRaw|{{{name|}}}}}]]}}}}{{#if:{{{resource2|}}}|[[Category:Regions with {{{resource2|}}}]]|{{#ifeq: {{Region/SwitchRaw|{{{name|}}}}}|FAIL|[[Category:Regions with unassociated resource]]|[[Category:Regions with {{Region/SwitchRaw|{{{name|}}}}}]]}}}}{{#if:{{{resource3|}}}|[[Category:Regions with {{{resource3|}}}]]|{{#ifeq: {{Region/SwitchRaw|{{{name|}}}}}|FAIL|[[Category:Regions with unassociated resource]]|[[Category:Regions with {{Region/SwitchRaw|{{{name|}}}}}]]}}}}{{#if:{{{resource4|}}}|[[Category:Regions with {{{resource4|}}}]]|{{#ifeq: {{Region/SwitchRaw|{{{name|}}}}}|FAIL|[[Category:Regions with unassociated resource]]|[[Category:Regions with {{Region/SwitchRaw|{{{name|}}}}}]]}}}}
 +
 
 +
{{#ifeq: {{{no resource}}} | true | [[Category:Regions with no resource]] }}
  
 
}} <!-- END #ifeq namespace -->
 
}} <!-- END #ifeq namespace -->

Revision as of 08:52, 10 March 2017

[edit] [purge]

Documentation


Usage

Sichuan

Icon-China.png China

Flag of the owner  Coat of Arms of Sichuan
Map of the region
Society
Capital Chengdu
Residents 77
Visitors 78
Language Chinese
Moving zone B4
Productivity
Resources Icon - Deer.png Icon - Grain.png
Icon - Cattle.png Icon - Fruits.png

Last update: February 4, 2018


{{Region
  |name = 
  |link = 
  |altname1 = 
  |altname2 = 
  |altname3 = 
  |number = 
  |coatofarms = 

<!-- Society --> 
  |capital = 
  |residents = 
  |visitors = 
  |language = 
  |movingzone = 
  |last update = 

<!-- Productivity --> 
  |resource1 = 
  |resource2 = 
  |resource3 = 
  |resource4 = 
}}

Notes

  • If a value is not known, do not enter a place holder value (n/a, none, ..., etc.). This might create a strange link.
  • This template automatically places the region into a "Region of country" and "Regions with resource" categories, so do not add any categories to region pages.
  • Coat of Arms - Use this place for the coat of arms of the region, but if there is none then use the coat of arms of the country.
  • Region map is added automatically.

Resources

  • If region has multiple resources, use resource1, resource2, resource3, resource4 (as many as the region has). If region has no resource, use resource1 and leave it blank.