Editing Template:Routebox

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 31: Line 31:
  
 
Check to see if type is valid
 
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 | eurovelo = | #default = <br/><span style="font-size:8pt"><span style="color:red;">'''Error:'''</span> Invalid type specified</span><includeonly>[[Category:Pages with errors]]</includeonly> }} <!--
+
-->{{#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 | eurovelo = | #default = <br/><span style="font-size:8pt"><span style="color:red;">'''Error:'''</span> Invalid type specified</span><includeonly>[[Category:Pages with errors]]</includeonly> }} <!--
  
 
--></td></tr><!--
 
--></td></tr><!--
 +
 +
Define the name of the map, if "mapname" exists, use that, otherwise default to "PAGENAME".png
 +
-->{{#vardefine:theimagename| {{#if: {{{mapname|}}} | Image:{{{mapname}}} |  Image:{{PAGENAME}}.png }} }}<!--
 +
 +
Add Map extract if map file does not exist
 +
<display_map service="openlayers">{{lat}},{{lng}}</display_map>
 +
 +
 +
--> {{#ifexist: {{#var:theimagename}} | | {{#if: {{{sabremap|}}} |<tr><td colspan="2" align="center" width="250px">
 +
{{{sabremap}}} [[Category:Pages with SABRE Maps routeboxes]]
 +
</td></tr> | [[Category:Needs Map]] }} }}<!--
 +
 +
If the map exists, use it, if not, categorise as requiring a map.
 +
-->{{#ifexist: {{#var:theimagename}} |<tr><td align=center colspan="2">[[{{#var:theimagename}}|250px]]</td></tr>  }}<!--
 +
 +
Map Caption
 +
-->{{#if: {{{mapcaption|}}} | <tr><td align="center" colspan="2">{{{mapcaption}}}</td></tr>}}<!--
 +
 +
  
 
Name
 
Name
 
-->{{#if: {{{name|}}} | <tr><td align="center" colspan="2">'''{{{name}}}'''</td></tr>}}<!--
 
-->{{#if: {{{name|}}} | <tr><td align="center" colspan="2">'''{{{name}}}'''</td></tr>}}<!--
  
 +
Build gridref links
 +
 +
-->{{#vardefine: grfrom | {{#switch: {{{country|Great Britain}}}
 +
| Northern Ireland
 +
| northern ireland
 +
| Northern ireland
 +
| northern Ireland
 +
| NI
 +
| ni
 +
| Ni
 +
| Republic of Ireland
 +
| republic of ireland
 +
| Republic Of Ireland
 +
| Republic of ireland
 +
| ROI
 +
| Roi
 +
| RoI
 +
| roi
 +
| Ireland
 +
| ireland =
 +
| #default =
 +
}} }}<!--
 +
 +
-->{{#vardefine: grto | {{#switch: {{{country|Great Britain}}}
 +
| Northern Ireland
 +
| northern ireland
 +
| Northern ireland
 +
| northern Ireland
 +
| NI
 +
| ni
 +
| Ni
 +
| Republic of Ireland
 +
| republic of ireland
 +
| Republic Of Ireland
 +
| Republic of ireland
 +
| ROI
 +
| Roi
 +
| RoI
 +
| roi
 +
| Ireland
 +
| ireland =
 +
| #default =
 +
}} }}<!--
  
 
From
 
From
Line 46: Line 108:
  
 
Via
 
Via
-->{{#if: {{{via|}}} | <tr><td align="right">'''Via:{{nb1}}'''</td><td align="left">{{{via}}}</td></tr> }}<!--
+
-->{{#if: {{{via|}}} | <tr><td align="right">'''Via:'''</td><td align="left">{{{via}}}</td></tr> }}<!--
  
 
Meets - First checks whether route is defunct, then chooses to display "met" or "meets" in the infobox.  Also deals with displaying "metyear" parameter if included and appropriate.
 
Meets - First checks whether route is defunct, then chooses to display "met" or "meets" in the infobox.  Also deals with displaying "metyear" parameter if included and appropriate.
Line 85: Line 147:
 
}}<!--
 
}}<!--
  
 +
Grid Refs
 +
-->{{#if: {{{gridrefs|}}} | <tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Grid References'''</td></tr><tr><td colspan="2" align="center">{{{gridrefs}}}</td></tr>}}<!--
  
 
Location
 
Location
Line 91: Line 155:
 
</td></tr>}}<!--
 
</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>}}<!--
 
  
 
Length
 
Length
Line 111: Line 171:
  
 
Authority
 
Authority
-->{{#if: {{{authority|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Highway Authority'''</td></tr><tr><td colspan="2" align="center">
+
-->{{#if: {{{authority|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Highway Authorities'''</td></tr><tr><td colspan="2" align="center">
 
{{{authority}}}  
 
{{{authority}}}  
 
</td></tr>}}<!--
 
</td></tr>}}<!--
Line 146: Line 206:
 
-->{{#ifeq: {{{type|}}} | cycle route | [[Category:Cycle Routes]]}}<!--
 
-->{{#ifeq: {{{type|}}} | cycle route | [[Category:Cycle Routes]]}}<!--
 
-->{{#ifeq: {{{type|}}} | eurovelo | [[Category:EuroVelo]] [[Category:Cycle Routes]]}}<!--
 
-->{{#ifeq: {{{type|}}} | eurovelo | [[Category:EuroVelo]] [[Category:Cycle Routes]]}}<!--
 +
-->{{#if: {{{gridrefs|{{{gridref_from|{{{gridref_to|}}}}}}}}}|| [[Category:Articles without grid references]] }} <!--
 +
-->{{#if: {{{gridrefs|}}} | [[Category:Articles using the gridrefs parameter]] }} <!--
 
-->{{#if: {{{county|}}} || [[Category:Articles without county information]] }} <!--
 
-->{{#if: {{{county|}}} || [[Category:Articles without county information]] }} <!--
 
-->{{#if: {{{authority|}}} || {{#ifeq: {{{former}}} | no | [[Category:Articles without authority information]] }} }} <!--
 
-->{{#if: {{{authority|}}} || {{#ifeq: {{{former}}} | no | [[Category:Articles without authority information]] }} }} <!--

Please note that all contributions to All About Ayrshire may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see All About Ayrshire:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)