Difference between revisions of "Template:County"

From All About Ayrshire
Jump to: navigation, search
 
Line 1: Line 1:
<noinclude>{{High use}}<div style="border: 2px solid black; background-color:wheat; margin:4px;padding:4px;">
+
<table style="margin:6px;clear:right;" class="toc colour" align="right" width="267"><!--
'''<big>Documentation: {{BASEPAGENAME}}</big>'''
 
  
The Infobox is the big template down the right hand side of every single page on the Wiki, other than those that relate to a road.  This template calls the main '''[[:Template:Infobox|&#123;&#123;Infobox&#125;&#125;]]''', and passes parameters to it that are relevant to Historic (or Traditional) Counties.  Please do not use this for Highway Authorities, use [[:Template:Highway Authority|&#123;&#123;Highway Authority&#125;&#125;]] instead.  Other types of county should not have pages on the Wiki.
+
Name and colour in heading row
 +
--><tr><td style="background:{{Get bg colour|{{{type|county}}} }}; border:1px solid #AFA3BF; color:{{Get text colour|{{{type|county}}} }}; font-size:14pt; padding:4px; font-weight: bold;" align=center colspan="2">'''{{#if: {{{name|}}} | {{{name}}} | {{PAGENAME}} }}'''<!--
 +
-->{{#if: {{{welsh|}}} | <br/><span style="font-size:12pt;color:{{Get welsh colour|{{{type|county}}}}}">''{{{welsh}}}''</span> }}<!--
 +
-->{{#if: {{{irish|}}} | <br/><span style="font-size:12pt;color:{{Get irish colour|{{{type|county}}}}}">''{{{irish}}}''</span> }}<!--
 +
-->{{#if: {{{gaelic|}}} | <br/><span style="font-size:12pt;color:{{Get gaelic colour|{{{type|county}}}}}">''{{{gaelic}}}''</span> }}<!--
 +
--></td></tr><tr><td><!--
  
Do not edit this template unnecessarily as it is included in every County page. This causes issues regarding the Job Queue, after an update it takes hundreds of page views to clear the job queue. If edited twice, that number doubles (etc..) Smaller updates to other templates then need to wait for the job queue to clear before they take full effect, which can cause problems for other editors.
+
Check to see if type is valid
 +
-->{{#switch: {{{type|non primary}}} | primary | non primary  | motorway  | defunct  | unbuilt motorway | former motorway  | future motorway  | future primary  | unbuilt primary  | future non primary | unbuilt non primary | historical | roman | tourist | euroroute | e road | ncn | cycle route | private | train | eurovelo = | #default = <br/><span style="font-size:8pt"><span style="color:red;">'''Error:'''</span> Invalid type specified</span><includeonly>[[Category:Pages with errors]]</includeonly> }} <!--
  
Test all edits on [[Template:County sandbox]] first.
+
--></td></tr><!--
  
To use this template, copy the code below, replacing anything within <tags> as appropriate.  Note that these are only the most common tags, others are also available.
+
--><td><td align=center>{{{image}}}</td><!--
<div style="border: 1px dashed black; background-color:white; margin:2px;padding:4px;font-family:Courier,system;">
 
<nowiki>{{</nowiki>{{BASEPAGENAME}}<br/><nowiki>
 
| name                    = <name></nowiki><br/><nowiki>
 
| welsh                    = <welsh></nowiki><br/><nowiki>
 
| irish                    = <irish></nowiki><br/><nowiki>
 
| gaelic                  = <gaelic></nowiki><br/><nowiki>
 
| image                    = <image></nowiki><br/><nowiki>
 
| caption                  = <caption></nowiki><br/><nowiki>
 
| lat                      = <lat></nowiki><br/><nowiki>
 
| lon                      = <lon></nowiki><br/><nowiki>
 
| zoom                    = <zoom></nowiki><br/><nowiki>
 
| layer                    = <layer></nowiki><br/><nowiki>
 
| static                  = <static></nowiki><br/><nowiki>
 
| borders                  = <borders></nowiki><br/><nowiki>
 
| current_authority        = <current_authority></nowiki><br/><nowiki>
 
| primary_destinations    = <primary_destinations></nowiki><br/><nowiki>
 
| terminal_destinations    = <terminal_destinations></nowiki><br/><nowiki>
 
| non_primary_destinations = <non_primary_destinations></nowiki><br/><nowiki>
 
| HA_roads                = <HA_roads></nowiki><br/><nowiki>
 
| TS_roads                = <TS_roads></nowiki><br/><nowiki>
 
| TW_roads                = <TW_roads></nowiki><br/><nowiki>
 
| NRA_roads                = <NRA_roads></nowiki><br/><nowiki>
 
| RS_roads                = <RS_roads></nowiki><br/><nowiki>
 
| TfL_roads                = <TfL_roads></nowiki><br/><nowiki> }}</nowiki>
 
</div>
 
'''<name>''' - The primary English name of the county.<br/>
 
'''<welsh>''' - The Welsh name of the county.<br/>
 
'''<irish>''' - The Irish name of the county.<br/>
 
'''<gaelic>''' - The Gaelic name of the county.<br/>
 
'''<image>''' - A suitable picture for diplaying to illustrate the county, often a static map.<br/>
 
'''<nowiki><caption></nowiki>''' - The caption for the above image, if needed.<br/>
 
'''<lat>''' - The latitude of the mid-point of the county.  Needed to display a map.<br/>
 
'''<lon>''' - The longitude of the mid-point of the county.  Needed to display a map.<br/>
 
'''<zoom>''' - The zoom level of a displayed map.<br/>
 
'''<static>''' - Forces a map to display in static mode, so removes the ability to scroll or zoom. Must be equal to ''true'' if desired.<br/>
 
'''<layer>''' - The Maps layer displayed in this Infobox.  Defaults to OpenStreetMap if not used.<br/>
 
'''<borders>''' - Historic Counties that border this county.<br/>
 
'''<primary_destinations>''' - Primary Destinations within the Historic County.  Used for counties within the United Kingdom.<br/>
 
'''<terminal_destinations>''' - Terminal and Intermediate Destinations within the Historic County.  Used for counties within the Republic of Ireland.<br/>
 
'''<non_primary_destinations>''' - Non-Primary Destinations within the Historic County that have pages on the SABRE Wiki.<br/>
 
'''<current_authority>''' - Current local authorities that maintain the non-Trunk network within the Historic County.<br/>
 
'''<HA_roads>''' - Roads managed by the Highways Agency within the Historic County.  Only valid for English counties.<br/>
 
'''<TS_roads>''' - Roads managed by Transport Scotland within the Historic County.  Only valid for Scottish counties.<br/>
 
'''<TW_roads>''' - Roads managed by the Welsh Assembly Government within the Historic County.  Only valid for Welsh counties.<br/>
 
'''<NRA_roads>''' - Roads managed by the National Roads Authority within the Historic County.  Only valid for counties in the Republic of Ireland.<br/>
 
'''<RS_roads>''' - Roads managed by the NI Roads Service within the Historic County.  Only valid for counties in Northern Ireland.<br/>
 
'''<TfL_roads>''' - Roads managed by Transport for London within the Historic County.  Only valid for areas within the Greater London Authority.<br/>
 
</div>[[Category:Infoboxes using the main Infobox template]]</noinclude><!--
 
  
 +
Country
 +
-->{{#if: {{{country|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Country'''</td></tr><tr><td colspan="2" align="center">
 +
{{{country}}}
 +
</td></tr>}}<!--
  
-->{{Infobox
+
 
<!-- Set up names and colours -->
+
Area
| type              = county
+
-->{{#if: {{{area|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Total Area'''</td></tr><tr><td colspan="2" align="center">
| name              = {{{name|}}}
+
{{{area}}}  
| welsh              = {{{welsh|}}}
+
</td></tr>}}<!--
| irish              = {{{irish|}}}
+
 
| gaelic            = {{{gaelic|}}}
+
 
<!-- Set up infobox picture and gallery -->
+
 
| gallery            = {{{gallery|{{PAGENAME}}}}}
+
--></table><!--
| image              = {{{image|}}}
+
 
| caption            = {{{caption|}}}
+
 
<!-- Set up location and map parameters.  Default zoom to 12, and force map to appear at top of Infobox  -->
+
 
| lat                = {{{lat|}}}
+
 
| lng                = {{{lng|}}}
+
## Categories ##
| lon                = {{{lon|}}}
+
--><includeonly><!--
| zoom              = {{{zoom|8}}}
+
 
| layer              = {{{layer|}}}
+
Categorise in the main "County" category.  They will be sorted by the name given in then "name" parameter, unless that is not used, in which case it uses the page name.
| height            = {{{height|}}}
+
-->{{DEFAULTSORT:{{{name|{{PAGENAME}}}}}}}
| static            = {{{static|}}}
+
[[Category:County]]
| trace              = {{{trace|}}}
+
 
| maploc            = top
+
</includeonly>
<!-- Set up geographic items related specifically to the county -->
 
| borders            = {{{borders|}}}
 
| primary_destinations = {{{primary_destinations|}}}
 
| terminal_destinations = {{{terminal_destinations|}}}
 
| non_primary_destinations = {{{non_primary_destinations|}}}
 
| current_authority  = {{{current_authority|}}}
 
<!-- Set up trunk roads within the county -->
 
| HA_roads          = {{{HA_roads|}}}
 
| TS_roads          = {{{TS_roads|}}}
 
| TW_roads          = {{{TW_roads|}}}
 
| NRA_roads          = {{{NRA_roads|}}}
 
| RS_roads          = {{{RS_roads|}}}
 
| TfL_roads          = {{{TfL_roads|}}}
 
}}
 

Latest revision as of 18:03, 25 October 2015

County
{{{image}}}