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...")
 
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{High use}}<div style="border: 2px solid black; background-color:wheat; margin:4px;padding:4px;">
+
<noinclude><div style="border: 2px solid black; background-color:wheat; margin:4px;padding:4px;">
 
'''<big>Documentation: {{BASEPAGENAME}}</big>'''
 
'''<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.
+
The Infobox is the big template down the right hand side of every single page on the Wiki. This specific one relates to Places (Cities, Towns, Villages and Hamlets).   
  
'''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.
+
The format should be placed in your article as follows:
  
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.
+
<pre style="width:75%; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap;
 +
word-wrap: break-word;">
 +
{{Place
 +
| name              = Ardrossan
 +
| image              =
 +
| gaelic            = Baile an t-Salainn
 +
| country            = Scotland
 +
| county            = North Ayrshire
 +
{{#display_map: 55.64464220631475,-4.810981750488281|mappingservice=leaflet|zoom=11}}
 +
}}
 +
</pre>
 +
'''This template should not be used separately'''
 +
</div>
 +
 
 +
[[Category:Templates used to generate other functions]]
 +
</noinclude>
 +
 
 +
<table style="margin:6px;clear:right;" class="toc colour" align="right" width="267"><!--
  
Test all edits on [[Template:Place sandbox]] first.
+
Name and colour in heading row
 +
--><tr><td style="background:{{Get bg colour|{{{type|place}}} }}; border:1px solid #AFA3BF; color:{{Get text colour|{{{type|place}}} }}; 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|place}}}}}">''{{{welsh}}}''</span> }}<!--
 +
-->{{#if: {{{irish|}}} | <br/><span style="font-size:12pt;color:{{Get irish colour|{{{type|place}}}}}">''{{{irish}}}''</span> }}<!--
 +
-->{{#if: {{{gaelic|}}} | <br/><span style="font-size:12pt;color:{{Get gaelic colour|{{{type|place}}}}}">''{{{gaelic}}}''</span> }}<!--
 +
--></td></tr><tr><td><!--
  
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.
+
Check to see if type is valid
<div style="border: 1px dashed black; background-color:white; margin:2px;padding:4px;font-family:Courier,system;">
+
-->{{#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> }} <!--
<nowiki>{{</nowiki>{{BASEPAGENAME}}<br/><nowiki>
+
 
  | name              = <name></nowiki><br/><nowiki>
+
--></td></tr><!--
  | welsh              = <welsh></nowiki><br/><nowiki>
+
 
  | irish              = <irish></nowiki><br/><nowiki>
+
--><td><td align=center>{{{image}}}</td><!--
  | gaelic            = <gaelic></nowiki><br/><nowiki>
+
 
  | country            = <country></nowiki><br/><nowiki>  
+
Country
  | region            = <region></nowiki><br/><nowiki>
+
-->{{#if: {{{country|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Country'''</td></tr><tr><td colspan="2" align="center">
| county            = <county></nowiki><br/><nowiki>
+
{{{country}}}
| authority          = <authority></nowiki><br/><nowiki>
+
</td></tr>}}<!--
| 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/>
+
County
'''<welsh>''' - The Welsh name of the place, if used on signage.<br/>
+
-->{{#if: {{{county|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''County'''</td></tr><tr><td colspan="2" align="center">
'''<irish>''' - The Irish name of the place, if used on signage.<br/>
+
{{{county}}}
'''<gaelic>''' - The Gaelic name of the place, if used on signage.<br/>
+
</td></tr>}}<!--
'''<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><!--
 
  
  
-->{{Infobox
+
--></table><!--
<!-- 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 ##
 
--><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.
+
<includeonly>
-->[[Category:Non Primary Destinations|{{{name|{{PAGENAME}}}}}]]<!--
+
[[Category:Places]]
-->[[Category:Places|{{{name|{{PAGENAME}}}}}]]</includeonly>
+
</includeonly>

Latest revision as of 07:03, 1 November 2015

Documentation: Place

The Infobox is the big template down the right hand side of every single page on the Wiki. This specific one relates to Places (Cities, Towns, Villages and Hamlets).

The format should be placed in your article as follows:

{{Place
 | name               = Ardrossan
 | image              = 
 | gaelic             = Baile an t-Salainn
 | country            = Scotland
 | county             = North Ayrshire
{{#display_map: 55.64464220631475,-4.810981750488281|mappingservice=leaflet|zoom=11}}
}}

This template should not be used separately


Place
{{{image}}}