Difference between revisions of "Template:Infobox castle"

From Wikishire
Jump to: navigation, search
(6 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
|-
 
|-
 
! colspan=2 style="background: white; text-align: center; font-size: 100%;" {{!}}
 
! colspan=2 style="background: white; text-align: center; font-size: 100%;" {{!}}
{{#var:shire}}{{#ifeq:{{#var:shire}}|Yorkshire|{{#if:{{{riding|}}}|{{riding|{{{riding}}}}}<br /><small>{{#switch:{{#var:riding}}
+
{{#var:shire}}{{#ifeq:{{#var:shire}}|Yorkshire|{{#if:{{{riding|}}}|{{#vardefine:riding|{{{riding}}}}}<br /><small>{{ridinglink|{{#var:riding}}}}</small>}} }}
|East Riding of Yorkshire=[[East Riding of Yorkshire|East Riding]]
+
|North Riding of Yorkshire=[[North Riding of Yorkshire|North Riding]]
+
|West Riding of Yorkshire=[[West Riding of Yorkshire|West Riding]]
+
|}}</small>}} }}
+
 
|- class="note"
 
|- class="note"
 
{{#if: {{{picture<includeonly>|</includeonly>}}} |
 
{{#if: {{{picture<includeonly>|</includeonly>}}} |
Line 25: Line 21:
 
{{#if: {{{os grid ref<includeonly>|</includeonly>}}} |
 
{{#if: {{{os grid ref<includeonly>|</includeonly>}}} |
 
! style="background: #D0F0C0;" {{!}} Grid reference:
 
! style="background: #D0F0C0;" {{!}} Grid reference:
{{!}} {{map|{{{os grid ref}}}}} }}
+
{{!}} {{#if:{{{os grid ref|}}}|{{map|{{{os grid ref}}}}} }} }}
 
|-
 
|-
 
{{#if: {{{latitude<includeonly>|</includeonly>}}} |
 
{{#if: {{{latitude<includeonly>|</includeonly>}}} |
 
! style="background: #D0F0C0;" {{!}} Location:
 
! style="background: #D0F0C0;" {{!}} Location:
 
{{!}} {{wmap|{{{latitude}}}|{{{longitude}}}|zoom=14|name={{#if: {{{name| }}}|{{{name}}}|{{PAGENAME}}}}}} }}
 
{{!}} {{wmap|{{{latitude}}}|{{{longitude}}}|zoom=14|name={{#if: {{{name| }}}|{{{name}}}|{{PAGENAME}}}}}} }}
 +
|-
 +
{{#if: {{{city<includeonly>|</includeonly>}}} |
 +
! style="background: #D0F0C0;" {{!}} City:
 +
{{!}} {{ifif|{{{city}}}}} }}
 
|-
 
|-
 
{{#if: {{{town<includeonly>|</includeonly>}}} |
 
{{#if: {{{town<includeonly>|</includeonly>}}} |
Line 81: Line 81:
 
|broch=[[Category:Brochs of {{#var:shire}}]]
 
|broch=[[Category:Brochs of {{#var:shire}}]]
 
|hillfort
 
|hillfort
|hill fort=[[Category:Hill forts in {{#var:shire}}]]{{riding category|Hill forts}}
+
|hill fort={{buildcat|Hill forts|{{#var:shire}}}}
|martello tower=[[Category:Martello towers in {{#var:shire}}]]{{riding category|Martello towers}}
+
|martello tower={{buildcat|Martello towers|{{#var:shire}}}}
 
|peel tower
 
|peel tower
 
|pele tower=[[Category:Peel towers in {{#var:shire}}]]{{riding category|Peel towers}}
 
|pele tower=[[Category:Peel towers in {{#var:shire}}]]{{riding category|Peel towers}}
Line 109: Line 109:
 
}}
 
}}
 
|{{Castlecat|{{#var:shire}}}}
 
|{{Castlecat|{{#var:shire}}}}
}}|{{Castlecat|{{#var:shire}}}}}}{{#ifeq:{{lc:{{{garden}}}}}|yes|[[Category:Gardens in {{#var:shire}}]]{{riding category|Gardens}}}}{{#if:{{{picture|}}}||[[Category:Castle and fort articles with no infobox picture]]}}</includeonly><noinclude>{{Infobox castle/doc}}
+
}}|{{Castlecat|{{#var:shire}}}}}}<!--Townsite code line-->{{#vardefine:town|{{extract name|{{#if:{{{city|}}}|{{{city}}}|{{#if:{{{town|}}}|{{{town}}}|{{#if:{{{village|}}}|{{{village}}}|0 }} }} }} }} }}{{town site|{{town fix|{{#var:town}}}}|{{#var:type}}}}<!--Garden line-->{{#if:{{{garden|}}}|{{#vardefine:gtag|{{#ifeq:{{#sub:{{{garden}}}|0|3}}|by |{{#sub:{{{garden}}}|3|{{#len:{{{garden}}}}}-3}}|{{{garden}}} }} }}{{#switch:{{lc:{{{#var:gtag}}}}}
 +
|no
 +
|none=
 +
|{{Gardener|{{#var:gtag}}|{{#var:shire}}}}
 +
}}}}{{#if:{{{picture|}}}||[[Category:Castle and fort articles with no infobox picture]]}}</includeonly><noinclude>{{Infobox castle/doc}}
 
[[Category:Infoboxes|Castle]]</noinclude>
 
[[Category:Infoboxes|Castle]]</noinclude>

Revision as of 08:20, 13 August 2020

Infobox castle
[[File:{{{picture}}}|250px]]
{{{picture caption}}}
{{{class}}}
Type: {{{type}}}
Location
Grid reference:
Location: {{{latitude}}} {{{longitude}}}
City: {{{city}}}
Town: {{{town}}}
Village: {{{village}}}
History
Built {{{built}}}
Material: {{{material}}}
Battles: {{{battles}}}
Key events: {{{events}}}
Information
Condition: {{{condition}}}
Owned by: {{{ownership}}}
(in the care of {{{controlled by}}})
Garrison: {{{garrison}}}
Website: {{{website}}}
E-mail: {{{email}}}
Template:Infobox castle/doc