Difference between revisions of "Template:Place"

From All About Ayrshire
Jump to: navigation, search
(Created page with "<noinclude>{{High use}}<div style="border: 2px solid black; background-color:wheat; margin:4px;padding:4px;"> '''<big>Documentation: {{BASEPAGENAME}}</big>''' The Infobox is...")
 
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 Places that are not Primary Destinations (in the UK) or Terminal or Intermediate Destinations (in the Republic of Ireland).  It also places the page within the correct regional or national Place categories.
+
Name and colour in heading row
 +
--><tr><td style="background:{{Get bg colour|{{{type|non primary}}} }}; border:1px solid #AFA3BF; color:{{Get text colour|{{{type|non primary}}} }}; 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|non primary}}}}}">''{{{welsh}}}''</span> }}<!--
 +
-->{{#if: {{{irish|}}} | <br/><span style="font-size:12pt;color:{{Get irish colour|{{{type|non primary}}}}}">''{{{irish}}}''</span> }}<!--
 +
-->{{#if: {{{gaelic|}}} | <br/><span style="font-size:12pt;color:{{Get gaelic colour|{{{type|non primary}}}}}">''{{{gaelic}}}''</span> }}<!--
 +
--></td></tr><tr><td></td></tr><!--
  
'''If a place is in one of the official categories, then do not use this template''' - use '''[[:Template:Primary Destination|&#123;&#123;Primary Destination&#125;&#125;]]''' instead.
+
Location
 +
-->{{#if: {{{location|}}} | <tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Location'''</td></tr><tr><td colspan="2" align="center">{{{location}}}</td></tr>}}<!--
 +
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>}}<!--
  
Do not edit this template unnecessarily as it is included in every Non-Primary Destination 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.
+
County
 +
-->{{#if: {{{county|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Local Authority'''</td></tr><tr><td colspan="2" align="center">{{{county}}}
 +
</td></tr>}}<!--
  
Test all edits on [[Template:Place sandbox]] first.
+
Roads
 +
-->{{#if: {{{roads|}}} | <tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Road that Pass Over'''</td></tr><tr><td colspan="2" align="center">{{{roads}}}</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.
+
Local Roads
<div style="border: 1px dashed black; background-color:white; margin:2px;padding:4px;font-family:Courier,system;">
+
-->{{#if: {{{local_roads|}}} | <tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Local Roads'''</td></tr><tr><td colspan="2" align="center">{{{local_roads}}}</td></tr>}}<!--
<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>
 
| country            = <country></nowiki><br/><nowiki> 
 
| region            = <region></nowiki><br/><nowiki>
 
| county            = <county></nowiki><br/><nowiki>
 
| authority          = <authority></nowiki><br/><nowiki>
 
| image              = <image></nowiki><br/><nowiki>
 
| caption            = <caption></nowiki><br/><nowiki>
 
| primary_roads      = <primary_roads></nowiki><br/><nowiki>
 
| next              = <next></nowiki><br/><nowiki>
 
| next_td            = <next_td></nowiki><br/><nowiki>
 
| near              = <near></nowiki><br/><nowiki>
 
| near_td            = <near_td></nowiki><br/><nowiki>
 
| near_npd          = <near_npd></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>
 
| 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>
 
| rel1              = <rel1></nowiki><br/><nowiki>
 
| rel2              = <rel2></nowiki><br/><nowiki>
 
| rel3              = <rel3></nowiki><br/><nowiki>
 
| rel4              = <rel4></nowiki><br/><nowiki>
 
| rel5              = <rel5></nowiki><br/><nowiki> }}</nowiki>
 
</div>
 
''NOTE:  Unless expressly noted within this documentation, the phrase "Terminal Destination" also should be taken to include Intermediate Destinations''
 
  
'''<name>''' - The primary English name of the place.  For places in Wales where the Welsh name is primarily used, put it here.<br/>
+
Primary Roads
'''<welsh>''' - The Welsh name of the place, if used on signage.<br/>
+
-->{{#if: {{{primary_roads|}}} | <tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Primary Roads'''</td></tr><tr><td colspan="2" align="center">{{{primary_roads}}}</td></tr>}}<!--
'''<irish>''' - The Irish name of the place, if used on signage.<br/>
 
'''<gaelic>''' - The Gaelic name of the place, if used on signage.<br/>
 
'''<country>''' - The country that that place is located within.<br/>
 
'''<region>''' - The region that that place is located within.  Only valid for places in England and needs to be correctly formatted.<br/>
 
'''<county>''' - The Historic (or Traditional) County that that place is located within.<br/>
 
'''<authority>''' - The body that looks after non-Trunk roads in the place.<br/>
 
'''<image>''' - A suitable picture for diplaying to illustrate the place, often "welcome to" signage.<br/>
 
'''<nowiki><caption></nowiki>''' - The caption for the above image, if needed.<br/>
 
'''<primary_roads>''' - Primary Routes or National Primary Routes that run through the place. Include motorways where relevant.<br/>
 
'''<next>''' - The next Primary Destination found on signage on Primary Routes that run through the place.  Only use for items within the United Kingdom.<br/>
 
'''<next_td>''' - The next Terminal or Intermediate Destination found on signage on National Routes that run to the place.  Only use for items within the Republic of Ireland.<br/>
 
'''<near>''' - Nearby Primary Destinations that are not directly connected on the Primary Route network, but are signed from the place.  Only use for items within the United Kingdom.<br/>
 
'''<near_td>''' - Nearby Terminal Destinations that are not directly connected on the National Route network, but are signed from the place.  Only use for items within the Republic of Ireland.<br/>
 
'''<near_npd>''' - Nearby other destinations that are on the SABRE Wiki and are signed from the place.<br/>
 
'''<HA_roads>''' - Roads managed by the Highways Agency within the place.  Only valid for places in England.<br/>
 
'''<TS_roads>''' - Roads managed by Transport Scotland within the place.  Only valid for places in Scotland.<br/>
 
'''<TW_roads>''' - Roads managed by the Welsh Assembly Government within the place.  Only valid for places in Wales.<br/>
 
'''<NRA_roads>''' - Roads managed by the National Roads Authority within the place.  Only valid for places in the Republic of Ireland.<br/>
 
'''<RS_roads>''' - Roads managed by the NI Roads Service within the place.  Only valid for places in Northern Ireland.<br/>
 
'''<TfL_roads>''' - Roads managed by Transport for London within the place.  Only valid for places within the Greater London Authority.<br/>
 
'''<lat>''' - The latitude of the place.  Needed to display a map.<br/>
 
'''<lon>''' - The longitude of the place.  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/>
 
'''<rel''x''>''' - Related item, often a road number.<br/>
 
</div>[[Category:Infoboxes using the main Infobox template]]</noinclude><!--
 
  
 +
Other Nearby Primary Destinations
 +
-->{{#if: {{{near|}}} | <tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Other Nearby Destinations '''</td></tr><tr><td colspan="2" align="center">{{{near}}}</td></tr>}}<!--
  
-->{{Infobox
 
<!-- Set up names and colours -->
 
| type              = {{{type|non primary}}}
 
| name              = {{{name|}}}
 
| welsh              = {{{welsh|}}}
 
| irish              = {{{irish|}}}
 
| gaelic            = {{{gaelic|}}}
 
| country            = {{{country|}}}
 
<!-- Set up location items -->
 
| region            = {{{region|}}}
 
| county            = {{{county|}}}
 
| traditional_county = {{{traditional_county|}}}<!--obsolete tag - provided for compatibility-->
 
| ceremonial_county  = {{{ceremonial_county|}}}<!--obsolete tag - provided for compatibility-->
 
| authority          = {{{authority|}}}
 
<!-- Set up infobox picture and gallery -->
 
| gallery            = {{{gallery|{{PAGENAME}}}}}
 
| 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|}}}<!--obsolete tag - provided for compatibility-->
 
| lon                = {{{lon|}}}
 
| zoom              = {{{zoom|12}}}
 
| layer              = {{{layer|}}}
 
| height            = {{{height|}}}
 
| static            = {{{static|}}}
 
| trace              = {{{trace|}}}
 
| maploc            = top
 
<!-- Set up items related specifically to being a Non-Primary Destination -->
 
| primary_roads      = {{{primary_roads|}}}
 
| next              = {{{next|}}}
 
| near              = {{{near|}}}
 
| next_td            = {{{next_td|}}}
 
| near_td            = {{{near_td|}}}
 
| near_npd          = {{{near_npd|}}}
 
<!-- Set up trunk roads within the place -->
 
| HA_roads          = {{{HA_roads|}}}
 
| TS_roads          = {{{TS_roads|}}}
 
| TW_roads          = {{{TW_roads|}}}
 
| NRA_roads          = {{{NRA_roads|}}}
 
| RS_roads          = {{{RS_roads|}}}
 
| TfL_roads          = {{{TfL_roads|}}}
 
<!-- Related items -->
 
| relcat            = Places
 
| relname            = Places
 
| rel1              = {{{rel1|}}}
 
| rel2              = {{{rel2|}}}
 
| rel3              = {{{rel3|}}}
 
| rel4              = {{{rel4|}}}
 
| rel5              = {{{rel5|}}}
 
}}<!--
 
  
## Categories ##
+
 
 +
 
 +
--></table><!--
 +
 
 +
Categories
 
--><includeonly><!--
 
--><includeonly><!--
 +
-->{{#ifeq: {{{type|}}} | non primary | [[Category:Non Primary Routes]]}}<!--
 +
-->[[Category:Places]]<!--
 +
--></includeonly><!--
  
Categorise in the Places regional categories, as long as the "region" parameter is set correctly.  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.
 
-->{{#if: {{{region|}}}
 
    | [[Category:Places in {{Parse Region|{{{region|}}}|forcat=yes}}|{{{name|{{PAGENAME}}}}}]]
 
    | {{#if: {{{country|}}}
 
        | [[Category:Places in {{{country|}}}|{{{name|{{PAGENAME}}}}}]]
 
        | [[Category:Places|{{{name|{{PAGENAME}}}}}]]
 
      }}
 
  }}<!--
 
  
Put other categories.
+
-->
-->[[Category:Non Primary Destinations|{{{name|{{PAGENAME}}}}}]]<!--
 
-->[[Category:Places|{{{name|{{PAGENAME}}}}}]]</includeonly>
 

Revision as of 21:00, 14 October 2015

Place