Difference between revisions of "Template:Routebox"

From All About Ayrshire
Jump to: navigation, search
Line 35: Line 35:
 
--></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
 
-->{{#if: {{{name|}}} | <tr><td align="center" colspan="2">'''{{{name}}}'''</td></tr>}}<!--
 
  
 
Build gridref links
 
Build gridref links
Line 160: Line 140:
 
</td></tr>}}<!--
 
</td></tr>}}<!--
  
RoadName
+
Road Name
-->{{#if: {{{name1|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Road Name'''</td></tr><tr><td colspan="2" align="center">
+
-->{{#if: {{{name|}}} |<tr><td style="background:#ffcc00; border:1px solid #2E0854" colspan="4" align="center">'''Road Name'''</td></tr><tr><td colspan="2" align="center">
{{{name1}}}  
+
{{{name}}}  
 
</td></tr>}}<!--
 
</td></tr>}}<!--
  

Revision as of 20:27, 7 October 2015

Documentation: Routebox

The Routebox is the big template down the right hand side of every single roads page on the Wiki.

Do not edit this template unnecessarily as it is included in about 6,000 pages. This causes issues regarding the Job Queue, after an update it takes 6,000 page views to clear the job queue. If edited twice, that number doubles to 12,000 (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.

Test all edits on Template:Routebox Sandbox first (the sandbox template is included in A449 Sandbox)

To use this template, copy the code below, replacing anything within <tags> as appropriate.

{{Routebox | <lots> }}

<lots> - There are literally hundreds of different options available. See the Help:Routeboxes page for details of how to use this template.


Routebox
From:-{{{from}}}
To:-{{{to}}}