Template:Infobox test: Difference between revisions

From Stiles Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>
<includeonly>
<table class="infobox location">
{{infobox
<tr>
|aboveclass = mergedtoprow {{#if:{{{title1|}}}||mergedbottomrow}} name
<th class="name" colspan="2">{{{title|{{PAGENAME}}}}}</th>
|above = {{#if:{{{name|}}}|{{{name|}}}|{{PAGENAME}}}}
</tr>
|subheaderrowclass1 = {{#if:{{{title2|}}}|mergedrow|mergedbottomrow}} title
{{#if:{{{tag|}}}|
|subheader1 = {{#if:{{{title1|}}}|{{{title1|}}}}}
<tr class="mergedtoprow">
|subheaderrowclass2 = {{#if:{{{title3|}}}|mergedrow|mergedbottomrow}} title
<td class="tag {{{tag}}}" colspan="2">{{{tag}}}</td>
|subheader2 = {{#if:{{{title2|}}}|{{{title2|}}}}}
</tr>
|subheaderrowclass3 = {{#if:{{{title4|}}}|mergedrow|mergedbottomrow}} title
}}
|subheader3 = {{#if:{{{title3|}}}|{{{title3|}}}}}
{{#if:{{{image|}}}|
|subheaderrowclass4 = mergedbottomrow
<tr class="mergedtoprow">
|subheader4 = {{#if:{{{title4|}}}|{{{title4|}}}}}
<td colspan="2">[[File:{{{image}}}|275px]]</td>
|imagerowclass1 = mergedtoprow {{#if:{{{image2|}}}||mergedbottomrow}}
</tr>
|image1 = {{#if:{{{image1|}}}|[[File:{{{image1|}}}|250px]]}}
}}
|caption1 = {{#if:{{{imagecaption1|}}}|{{{imagecaption1|}}}}}
{{#if:{{{image-tab|}}}|
|imagerowclass2 = mergedbottomrow
<tr class="mergedtoprow">
|image2 = {{#if:{{{image2|}}}|[[File:{{{image2|}}}|250px]]}}
<td colspan="2">{{{image-tab}}}</td>
|caption2 = {{#if:{{{imagecaption2|}}}|{{{imagecaption2|}}}}}
</tr>
|image3 = {{#if:{{{image-tab|}}}|{{{image-tab|}}}}}
}}
|rowclass1 = mergedtoprow {{#ifeq:{{#expr:{{#if:{{{race|}}}|1|0}}or{{#if:{{{class|}}}|1|0}}or{{#if:{{{faith|}}}|1|0}}or{{#if:{{{alignment|}}}|1|0}}}}|0|mergedbottomrow}}
{{#if:{{{location|}}}|
|label1 = Gender
<tr class="mergedtoprow">
|data1 = {{#if:{{{gender|}}}|{{{gender|}}}}}
<th>Location</th>
|rowclass2 = {{#ifeq:{{#expr:{{#if:{{{gender|}}}|1|0}}}}|0|mergedtoprow}} {{#ifeq:{{#expr:{{#expr:{{#if:{{{gender|}}}|1|0}}}}and{{#expr:{{#if:{{{class|}}}|1|0}}or{{#if:{{{faith|}}}|1|0}}or{{#if:{{{alignment|}}}|1|0}}}}}}|1|mergedrow}} {{#ifeq:{{#expr:{{#if:{{{class|}}}|1|0}}or{{#if:{{{faith|}}}|1|0}}or{{#if:{{{alignment|}}}|1|0}}}}|0|mergedbottomrow}}
<td>{{{location}}}</td>
|label2 = Race
</tr>
|data2 = {{#if:{{{race|}}}|{{{race|}}}}}
}}
|rowclass3 = {{#ifeq:{{#expr:{{#if:{{{gender|}}}|1|0}}or{{#if:{{{race|}}}|1|0}}}}|0|mergedtoprow}} {{#ifeq:{{#expr:{{#expr:{{#if:{{{gender|}}}|1|0}}or{{#if:{{{race|}}}|1|0}}}}and{{#expr:{{#if:{{{faith|}}}|1|0}}or{{#if:{{{alignment|}}}|1|0}}}}}}|1|mergedrow}} {{#ifeq:{{#expr:{{#if:{{{faith|}}}|1|0}}or{{#if:{{{alignment|}}}|1|0}}}}|0|mergedbottomrow}}
{{#if:{{{continent|}}}|
|label3 = Class
<tr class="mergedtoprow">
|data3 = {{#if:{{{class|}}}|{{{class|}}}}}
<th>Continent</th>
|rowclass4 = {{#ifeq:{{#expr:{{#if:{{{gender|}}}|1|0}}or{{#if:{{{race|}}}|1|0}}or{{#if:{{{class|}}}|1|0}}}}|0|mergedtoprow}} {{#ifeq:{{#expr:{{#expr:{{#if:{{{gender|}}}|1|0}}or{{#if:{{{race|}}}|1|0}}or{{#if:{{{class|}}}|1|0}}}}and{{#expr:{{#if:{{{alignment|}}}|1|0}}}}}}|1|mergedrow}} {{#ifeq:{{#expr:{{#if:{{{alignment|}}}|1|0}}}}|0|mergedbottomrow}}
<td>{{{continent}}}</td>
|label4 = Faith
</tr>
|data4 = {{#if:{{{faith|}}}|{{{faith|}}}}}
}}
|rowclass5 = {{#ifeq:{{#expr:{{#if:{{{gender|}}}|1|0}}or{{#if:{{{race|}}}|1|0}}or{{#if:{{{class|}}}|1|0}}or{{#if:{{{faith|}}}|1|0}}}}|0|mergedtoprow}} mergedbottomrow
{{#if:{{{country|}}}|
|label5 = Alignment
<tr class="mergedtoprow">
|data5 = {{#if:{{{alignment|}}}|{{{alignment|}}}}}
<th>Country</th>
|rowclass6 = mergedtoprow {{#ifeq:{{#expr:{{#if:{{{weight|}}}|1|0}}}}|0|mergedbottomrow}}
<td>{{{country}}}</td>
|label6 = Height
</tr>
|data6 = {{#if:{{{height|}}}|{{{height|}}}}}
}}
|rowclass7 = {{#ifeq:{{#expr:{{#if:{{{height|}}}|1|0}}}}|0|mergedtoprow}} mergedbottomrow
{{#if:{{{nearestcity|}}}|
|label7 = Weight
<tr class="mergedrow">
|data7 = {{#if:{{{weight|}}}|{{{weight|}}}}}
<th>Nearest City</th>
|rowclass8 = mergedtoprow {{#ifeq:{{#expr:{{#if:{{{age|}}}|1|0}}or{{#if:{{{born|}}}|1|0}}or{{#if:{{{died|}}}|1|0}}}}|0|mergedbottomrow}}
<td>{{{nearestcity}}}</td>
|label8 = Status
</tr>
|data8 = {{#if:{{{status|}}}|{{{status|}}}}}
}}
|rowclass9 = {{#ifeq:{{#expr:{{#if:{{{status|}}}|1|0}}}}|0|mergedtoprow}} {{#ifeq:{{#expr:{{#expr:{{#if:{{{status|}}}|1|0}}}}and{{#expr:{{#if:{{{born|}}}|1|0}}or{{#if:{{{died|}}}|1|0}}}}}}|1|mergedrow}} {{#ifeq:{{#expr:{{#if:{{{born|}}}|1|0}}or{{#if:{{{died|}}}|1|0}}}}|0|mergedbottomrow}}
{{#if:{{{largestcity|}}}|
|label9 = Age
<tr class="mergedrow">
|data9 = {{#if:{{{age|}}}|{{{age|}}}}}
<th>Largest City</th>
|rowclass10 = {{#ifeq:{{#expr:{{#if:{{{status|}}}|1|0}}or{{#if:{{{age|}}}|1|0}}}}|0|mergedtoprow}} {{#ifeq:{{#expr:{{#expr:{{#if:{{{status|}}}|1|0}}or{{#if:{{{age|}}}|1|0}}}}and{{#expr:{{#if:{{{died|}}}|1|0}}}}}}|1|mergedrow}} {{#ifeq:{{#expr:{{#if:{{{died|}}}|1|0}}}}|0|mergedbottomrow}}
<td>{{{largestcity}}}</td>
|label10 = Born
</tr>
|data10 = {{#if:{{{born|}}}|{{{born|}}}}}
}}
|rowclass11 = {{#ifeq:{{#expr:{{#if:{{{status|}}}|1|0}}or{{#if:{{{age|}}}|1|0}}or{{#if:{{{born|}}}|1|0}}}}|0|mergedtoprow}} mergedbottomrow
{{#if:{{{population|}}}|
|label11 = Died
<tr class="mergedrow">
|data11 = {{#if:{{{died|}}}|{{{died|}}}}}
<th>Population</th>
|rowclass12 = mergedtoprow {{#ifeq:{{#expr:{{#if:{{{campaigns|}}}|1|0}}or{{#if:{{{firstsession|}}}|1|0}}or{{#if:{{{lastsession|}}}|1|0}}}}|0|mergedbottomrow}}
<td>{{{population}}}</td>
|label12 = Setting
</tr>
|data12 = {{#if:{{{setting|}}}|{{{setting|}}}}}
}}
|rowclass13 = {{#ifeq:{{#expr:{{#if:{{{setting|}}}|1|0}}}}|0|mergedtoprow}} {{#ifeq:{{#expr:{{#expr:{{#if:{{{setting|}}}|1|0}}}}and{{#expr:{{#if:{{{firstsession|}}}|1|0}}or{{#if:{{{lastsession|}}}|1|0}}}}}}|1|mergedrow}} {{#ifeq:{{#expr:{{#if:{{{firstsession|}}}|1|0}}or{{#if:{{{lastsession|}}}|1|0}}}}|0|mergedbottomrow}}
{{#if:{{{area|}}}|
|label13 = Campaigns
<tr class="mergedrow">
|data13 = {{#if:{{{campaigns|}}}|{{{campaigns|}}}}}
<th>Area</th>
|rowclass14 = {{#ifeq:{{#expr:{{#if:{{{setting|}}}|1|0}}or{{#if:{{{campaigns|}}}|1|0}}}}|0|mergedtoprow}} {{#ifeq:{{#expr:{{#expr:{{#if:{{{setting|}}}|1|0}}or{{#if:{{{campaigns|}}}|1|0}}}}and{{#expr:{{#if:{{{lastsession|}}}|1|0}}}}}}|1|mergedrow}} {{#ifeq:{{#expr:{{#if:{{{lastsession|}}}|1|0}}}}|0|mergedbottomrow}}
<td>{{{area}}}</td>
|label14 = First Session
</tr>
|data14 = {{#if:{{{firstsession|}}}|{{{firstsession|}}}}}
}}
|rowclass15 = {{#ifeq:{{#expr:{{#if:{{{setting|}}}|1|0}}or{{#if:{{{campaigns|}}}|1|0}}or{{#if:{{{firstsession|}}}|1|0}}}}|0|mergedtoprow}} mergedbottomrow
{{#if:{{{owner|}}}|
|label15 = Last Session
<tr class="mergedrow">
|data15 = {{#if:{{{lastsession|}}}|{{{lastsession|}}}}}
<th>Owner</th>
|belowclass = mergedrowtop mergedrowbottom
<td>{{{owner}}}</td>
|below = {{#if:{{{charactersheet|}}}|[{{{charactersheet|}}} Character Sheet]}}
</tr>
[[Category:All Player Characters]]
}}
{{#vardefine:CampaignNumber|0}}
{{#if:{{{countries|}}}|
{{#vardefine:CampaignName|{{#replace:{{#replace:{{#replace:{{#explode:{{{campaigns}}}|{{•}}|{{#var:CampaignNumber}}}}|[|}}|]|}}|<br />|}}}}
<tr class="mergedtoprow">
{{#while:
<th>Countries</th>
|{{#if:{{#var:CampaignName}}|true}}
<td>{{{countries}}}</td>
|[[Category:{{#var:CampaignName}} PCs]]{{#vardefine:CampaignNumber|{{#expr:{{#var:CampaignNumber}}+1}}}}{{#vardefine:CampaignName|{{#replace:{{#replace:{{#explode:{{{campaigns}}}|{{•}}|{{#var:CampaignNumber}}}}|[|}}|]|}}}}
</tr>
}}
}}
}}</includeonly><noinclude>[[Category:Templates]]</noinclude>
{{#if:{{{largestcities|}}}|
<tr class="mergedrow">
<th>Largest Cities</th>
<td>{{{largestcities}}}</td>
</tr>
}}
{{#if:{{{government|}}}|
<tr class="mergedtoprow">
<th>Government</th>
<td>{{{government}}}</td>
</tr>
}}
{{#if:{{{capital|}}}|
<tr class="mergedrow">
<th>Capital</th>
<td>{{{capital}}}</td>
</tr>
}}
{{#if:{{{leader|}}}|
<tr class="mergedrow">
<th>Leader</th>
<td>{{{leader}}}</td>
</tr>
}}
{{#if:{{{languages|}}}|
<tr class="mergedtoprow">
<th>Languages</th>
<td>{{{languages}}}</td>
</tr>
}}
{{#if:{{{setting|}}}|
<tr class="mergedtoprow">
<th>Setting</th>
<td>{{{setting}}}</td>
</tr>
}}
</table>
[[Category:All Locations]]
{{#if:{{{tag|}}}|[[Category:All {{{tag}}}s]]}}
{{#if:{{{setting|}}}|[[Category:All {{{setting}}} Locations]]}}
{{#if:{{{tag|}}}|{{#if:{{{setting|}}}|[[Category:All {{{setting}}} {{{tag}}}s]]}}}}
</includeonly>
<noinclude>
== Blank Templates ==
=== Buildings/Areas ===
==== Image ====
|tag = Building/Area<br />
|image = <br />
|location = <br />
|area = <br />
|owner = <br />
|setting =
==== Image-Tab ====
|tag = Building/Area<br />
|image-tab = <br />
|location = <br />
|area = <br />
|owner = <br />
|setting =
=== Cities/Towns/Villages ===
==== Image ====
|tag = City/Town/Village<br />
|image = <br />
|country = <br />
|population = <br />
|area = <br />
|government = <br />
|leader = <br />
|languages = <br />
|setting =
==== Image-Tab ====
|tag = City/Town/Village<br />
|image-tab = <br />
|country = <br />
|population = <br />
|area = <br />
|government = <br />
|leader = <br />
|languages = <br />
|setting =
=== Forests ===
==== Image ====
|tag = Forest<br />
|image = <br />
|location = <br />
|nearestcity = <br />
|area = <br />
|setting =
==== Image-Tab ====
|tag = Forest<br />
|image-tab = <br />
|location = <br />
|nearestcity = <br />
|area = <br />
|setting =
=== Countries ===
==== Image ====
|tag = Country<br />
|image = <br />
|continent = <br />
|largestcity = <br />
|population = <br />
|area = <br />
|government = <br />
|capital = <br />
|leader = <br />
|languages = <br />
|setting =
==== Image-Tab ====
|tag = Country<br />
|image-tab = <br />
|continent = <br />
|largestcity = <br />
|population = <br />
|area = <br />
|government = <br />
|capital = <br />
|leader = <br />
|languages = <br />
|setting =
=== Continents ===
==== Image ====
|tag = Continent<br />
|image = <br />
|location = <br />
|population = <br />
|area = <br />
|countries = <br />
|largestcities = <br />
|languages = <br />
|setting =
==== Image-Tab ====
|tag = Continent<br />
|image = <br />
|location = <br />
|population = <br />
|area = <br />
|countries = <br />
|largestcities = <br />
|languages = <br />
|setting =  
</noinclude>

Revision as of 12:47, 23 March 2021