User:Niirfa-sa/Template:State

{{#ifexpr:{{#if:|1|0}} or {{#if:|2|0}}|
 * class="infoboxcell" colspan="{{#if:|1|0}}" style="width:{{#if:|50%|{{#if:|11%|25%}}|}}; vertical-align:top; " |
 * class="infoboxcell" colspan="{{#if:|1|0}}" style="width:{{#if:|50%|{{#if:|11%|25%}}|}}; vertical-align:top; " |


 * class="infoboxcell" colspan="" style="width:{{#if:|25%|{{#if:|33%|50%}}|}}" |

{{#ifexpr:{{#if:|1|0}} or {{#if:|2|0}}| {{{event2|}}}
 * }}
 * -|}}
 * class="infoboxcell" colspan="{{#if:|1|0}}" style="width:{{#if:{{date3|}}}|50%|{{#if:|11%|25%}}|}}; vertical-align:top; " |
 * class="infoboxcell" colspan="{{#if:|1|0}}" style="width:{{#if:{{date3|}}}|50%|{{#if:|11%|25%}}|}}; vertical-align:top; " |
 * class="infoboxcell" colspan="" style="width:{{#if:|25%|{{#if:{{{event3|}}}|33%|50%}}|}}" |

{{#ifexpr:{{#if:|1|0}} or {{#if:|2|0}}| {{{event3|}}}
 * }}
 * class="infoboxcell" colspan="{{#if:{{{event4|}}}|1|0}}" style="width:{{#if:{{date4|}}}|50%|{{#if:{{{event4|}}}|11%|25%}}|}}; vertical-align:top; " |
 * class="infoboxcell" colspan="{{#if:{{{event4|}}}|1|0}}" style="width:{{#if:{{date4|}}}|50%|{{#if:{{{event4|}}}|11%|25%}}|}}; vertical-align:top; " |
 * class="infoboxcell" colspan="" style="width:{{#if:{{{date4|}}}|25%|{{#if:{{{event4|}}}|33%|50%}}|}}" |

{{#ifexpr:{{#if:|1|0}} or {{#if:|2|0}}|
 * }}
 * class="infoboxcell" colspan="{{#if:|1|0}}" style="width:{{#if:{{end date|}}}|50%|{{#if:{{end event|}}}|11%|25%}}|}}; vertical-align:top; " |
 * class="infoboxcell" colspan="{{#if:|1|0}}" style="width:{{#if:{{end date|}}}|50%|{{#if:{{end event|}}}|11%|25%}}|}}; vertical-align:top; " |


 * class="infoboxcell" colspan="" style="width:" |

{{#ifexpr:{{#if:{{{predecessor|}}}|1|0}} or {{#if:{{{successor|}}}|2|0}}| {{ #if:{{{inhabitants|}}}{{{locations|}}}{{{settlements|}}}{{{organizations|}}}| {{!}} colspan="2" style="font-size:smaller; text-align:right" {{!}} {{ #if: {{{inhabitants|}}} | }}} | the }} {{{name|{{PAGENAME}}}}}|Inhabitants of {{ #if: {{{usethe|}}} | the }} {{{name|{{PAGENAME}}}}} }}{{ #if: {{{locations|}}} | }}} | on | in }} {{ #if: {{{usethe|}}} | the }} {{{name|{{PAGENAME}}}}}|Locations {{ #if: {{{useon|}}} | on | in }} {{ #if: {{{usethe|}}} | the }} {{{name|{{PAGENAME}}}}} }}{{ #if: {{{organizations|}}} | }}} | on | in }} {{ #if: {{{usethe|}}} | the }} {{{name|{{PAGENAME}}}}}|Organizations {{ #if: {{{useon|}}} | on | in }} {{ #if: {{{usethe|}}} | the }} {{{name|{{PAGENAME}}}}} }}{{ #if: {{{settlements|}}} | }}} | on | in }} {{ #if: {{{usethe|}}} | the }} {{{name|{{PAGENAME}}}}}|Settlements {{ #if: {{{useon|}}} | on | in }} {{ #if: {{{usethe|}}} | the }} {{{name|{{PAGENAME}}}}} }} }} {{ #if:{{{source|}}}| {{!}} colspan="2" style="font-size:smaller; text-align:right" {{!}} ''Source: {{{source}}}{{ #if: {{{page|}}} |, p. {{{page}}} }} }}
 * }}
 * }

An example is shown to the right: {{User:Niirfa-sa/Template:State }}
 * name          = Waterdeep
 * image        = [[Image:Waterdeep symbol.jpg|200px|The seal of the City of Splendors]]
 * caption      = The seal of the City of Splendors
 * aliases      = City of Splendors
 * demonym      = Waterdhavian
 * region        = Sword Coast North
 * capital      = Waterdeep
 * head of state = Open Lord Dagult Neverember
 * legislature  = The Lords of Waterdeep
 * judiciary    = Magisters
 * government   = Oligarchy
 * population   = 1.3 million
 * races        = {{percentage table|Humans|64|Dwarves|10|Elves|10|Halflings|5|Half-elves|5|Gnomes|3|Half-orcs|2|Others|1}}
 * religion    = Deneirans, Mystrans, and Oghmanytes
 * imports      = Grain, livestock, leather, ore, timber, and exotic goods from other lands
 * exports      = Ale, arms, cloth, furnishings, leather goods, pottery, refined metals, and all other sorts of finished goods
 * alignment    = {{alignment grid|on|on|on|on|on|on|on|on|on}}
 * established  =
 * start event  = Established
 * start date   = -1288 DR
 * inhabitants  = yes
 * locations    = yes
 * organizations = yes
 * event1    = Time of Troubles
 * date1     = 1358 DR
 * event2    = Shadow War
 * date2     = 1373 - 1374 DR
 * event3    = Spellplague
 * date3     = 1385 DR
 * event4    = Year of the Ageless One
 * date4     = 1479 DR
 * disestablish event = Destruction
 * disestablish date = 1536 DR
 * settlements  =
 * source       =
 * predecessor  = Cormyr symbol.png Cormyr
 * successor    = Neverwinter symbol.png Neverwinter