Difference between revisions of "Template:Region"

From eRepublik Official Wiki
Jump to: navigation, search
(update according to recent changes)
Line 1: Line 1:
<includeonly><div style="float:right; clear:right; opacity:1; width:250px; border:2px solid #C6E4F2; -moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;font-size:100%; background-color:#F1FAFF; margin:0px 0px 10px 10px; padding:10px 0px 5px 0px; text-align:left;">
+
<includeonly>{{#if: {{{resource|}}}|{{Update|date=As of [[Resource Wars (2016)|2016 Resource Wars]]}}}}<div style="float:right; clear:right; opacity:1; width:250px; border:2px solid #C6E4F2; -moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;font-size:100%; background-color:#F1FAFF; margin:0px 0px 10px 10px; padding:10px 0px 5px 0px; text-align:left;">
 
<div align="center"><span class="plainlinks" style="padding:1px;  font-size:130%; font-weight:bold; text-align:center; color:#3C8FA7">[http://www.erepublik.com/en/region/{{#if: {{{link|}}}|{{{link|}}}|{{{name|}}}}} <span>{{{name|Unnamed region}}}</span>{{#if:{{{altname1|}}}|<br /><span style="font-size:12px;">''{{{altname1|}}}''</span>|}}{{#if:{{{altname2|}}}|<br /><span style="font-size:12px;">''{{{altname2|}}}''</span>|}}{{#if:{{{altname3|}}}|<br /><span style="font-size:12px;">''{{{altname3|}}}''</span>|}}]</span>
 
<div align="center"><span class="plainlinks" style="padding:1px;  font-size:130%; font-weight:bold; text-align:center; color:#3C8FA7">[http://www.erepublik.com/en/region/{{#if: {{{link|}}}|{{{link|}}}|{{{name|}}}}} <span>{{{name|Unnamed region}}}</span>{{#if:{{{altname1|}}}|<br /><span style="font-size:12px;">''{{{altname1|}}}''</span>|}}{{#if:{{{altname2|}}}|<br /><span style="font-size:12px;">''{{{altname2|}}}''</span>|}}{{#if:{{{altname3|}}}|<br /><span style="font-size:12px;">''{{{altname3|}}}''</span>|}}]</span>
  
Line 21: Line 21:
 
{{RowV2|Original owner|{{#ifeq: {{Regions/Owners|{{BASEPAGENAME}}}}|{{RegionLink/Original|{{BASEPAGENAME}}}}||{{FlagLink|{{RegionLink/Original|{{BASEPAGENAME}}}}}}}}}}
 
{{RowV2|Original owner|{{#ifeq: {{Regions/Owners|{{BASEPAGENAME}}}}|{{RegionLink/Original|{{BASEPAGENAME}}}}||{{FlagLink|{{RegionLink/Original|{{BASEPAGENAME}}}}}}}}}}
 
{{RowV2|Capital|{{{capital|}}} }}
 
{{RowV2|Capital|{{{capital|}}} }}
{{RowV2|Population|{{{population|}}}}}
+
{{RowV2|Residents|{{{residents|}}}}}
 +
{{RowV2|Visitors|{{{visitors|}}}}}
 
{{RowV2|Language|{{{language|}}} }}
 
{{RowV2|Language|{{{language|}}} }}
 
{{RowV2|Moving zone|{{{movingzone|}}} }}
 
{{RowV2|Moving zone|{{{movingzone|}}} }}
 +
{{RowV2|Last update|''{{{last update|}}}'' }}
 
|}
 
|}
 
{| style="width:225px;"
 
{| style="width:225px;"
Line 30: Line 32:
 
{| 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]] | {{#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]] }} }}
+
{{RowV2|{{#if: {{{resource2|}}}|Resources|Resource}}|{{#if: {{{resource|}}} | [[File:Icon_-_{{{resource}}}.png|link={{{resource}}}|40px]] }} {{#if: {{{resource1|}}} | [[File:Icon_-_{{{resource1}}}.png|link={{{resource1}}}|40px]] | {{#if: {{{resource1}}}||''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 42:
 
{{#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:{{{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|}}}}}]]}}}}
+
{{#if:{{{resource|}}}|[[Category:Outdated region pages]]}}{{#if:{{{resource1|}}}|[[Category:Regions with {{{resource1|}}}]]|[[Category:Regions with no resource]]}}{{#if:{{{resource2|}}}|[[Category:Regions with {{{resource2|}}}]]}}{{#if:{{{resource3|}}}|[[Category:Regions with {{{resource3|}}}]]}}{{#if:{{{resource4|}}}|[[Category:Regions with {{{resource4|}}}]]}}
 
+
{{#ifeq: {{{no resource}}} | true | [[Category:Regions with no resource]] |  }}
+
  
 
}} <!-- END #ifeq namespace -->
 
}} <!-- END #ifeq namespace -->

Revision as of 16:28, 4 February 2018

[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.