Difference between revisions of "Template:Infobox"

From All About Ayrshire
Jump to: navigation, search
m (1 revision imported)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>{{High use}}<div style="border: 2px solid black; background-color:wheat; margin:4px;padding:4px;">
+
{{#invoke:Infobox|infobox}}<includeonly>{{template other|{{#ifeq:{{PAGENAME}}|Infobox||{{#ifeq:{{str left|{{SUBPAGENAME}}|7}}|Infobox|[[Category:Infobox templates|{{remove first word|{{SUBPAGENAME}}}}]]}}}}|}}</includeonly><noinclude>
'''<big>Documentation: {{BASEPAGENAME}}</big>'''
+
{{documentation}}
 
+
<!-- Categories go in the /doc subpage, and interwikis go in Wikidata. -->
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 is almost '''never used by itself''', but is instead called by other templates.
+
</noinclude>
 
 
Do not edit this template unnecessarily as it is included in about 7,000 pages. This causes issues regarding the Job Queue, after an update it takes 7,000 page views to clear the job queue. If edited twice, that number doubles to 14,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:Infobox sandbox]] first.
 
 
 
The template calls the following sub-templates, which format specific sections consistently:
 
* '''[[:Template:InfoboxPartA|&#123;&#123;InfoboxPartA&#125;&#125;]]'''
 
* '''[[:Template:InfoboxPartB|&#123;&#123;InfoboxPartB&#125;&#125;]]'''
 
* '''[[:Template:Get bg colour|&#123;&#123;Get bg colour&#125;&#125;]]'''
 
* '''[[:Template:Get text colour|&#123;&#123;Get text colour&#125;&#125;]]'''
 
* '''[[:Template:Get welsh colour|&#123;&#123;Get welsh colour&#125;&#125;]]'''
 
* '''[[:Template:Get irish colour|&#123;&#123;Get irish colour&#125;&#125;]]'''
 
* '''[[:Template:Get gaelic colour|&#123;&#123;Get gaelic colour&#125;&#125;]]'''
 
 
 
This template is called by the following templates, which set up various parameters appropriate for each use.  Changes here will affect all of the below templates:<br/>
 
* '''[[:Template:Primary Destination|&#123;&#123;Primary Destination&#125;&#125;]]'''
 
* '''[[:Template:Place|&#123;&#123;Place&#125;&#125;]]'''
 
* '''[[:Template:County|&#123;&#123;County&#125;&#125;]]'''
 
* '''[[:Template:Highway Authority|&#123;&#123;Highway Authority&#125;&#125;]]'''
 
* '''[[:Template:Airport|&#123;&#123;Airport&#125;&#125;]]'''
 
* '''[[:Template:Services|&#123;&#123;Services&#125;&#125;]]'''
 
* '''[[:Template:Crossing|&#123;&#123;Crossing&#125;&#125;]]'''
 
* '''[[:Template:Junction Box|&#123;&#123;Junction Box&#125;&#125;]]'''
 
* '''[[:Template:Road Scheme|&#123;&#123;Road Scheme&#125;&#125;]]'''
 
 
 
To use this template, copy the code below, replacing anything within <tags> as appropriate.
 
<div style="border: 1px dashed black; background-color:white; margin:2px;padding:4px;font-family:Courier,system;">
 
<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> | <lots> }}</nowiki>
 
</div>
 
'''<lots>''' - There are literally hundreds of different options available.  See the [[Help:Routeboxes]] page for details of how to use this template, though please bear in mind that the specific templates should be used in nearly every case rather than this master template.<br/>
 
</div>
 
 
 
[[Category:Infoboxes]]
 
 
 
 
 
</noinclude><!--
 
 
 
Start the table
 
--><table style="margin:6px;clear:both;" class="toc colour" align="right" width="267"><!--
 
 
 
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><!--
 
 
 
Add a map at the top of the infobox, if the "maploc" tag is used with the value of "top", or not used at all.  "Maploc" is usually defined within the template that calls this one.
 
If "sabremap" tag is used, use that specifically; if no sabremap tag exists, build a map from Maps using various tags!  Allows for most Maps tags, and allows for the alternate, deprecated use of the "lng" tag instead of the more common "lon" for the longitude of the centre point.  Uses "mapzoom" variable to set a default zoom level when one is not specified.  Uses "longitude" variable to account for the use of both "lon" and "lng" tags.
 
-->{{#if: {{{zoom|}}}|{{#vardefine:mapzoom|{{{zoom}}} }}|{{#vardefine:mapzoom|13}} }}<!--
 
-->{{#if: {{{lon|}}}|{{#vardefine:longitude|{{{lon}}} }} }}<!--
 
-->{{#if: {{{lng|}}}|{{#vardefine:longitude|{{{lng}}} }} }}<!--
 
 
 
-->{{#ifeq: {{{maploc|top}}} | top |
 
      {{#if: {{{sabremap|}}} 
 
            | <tr><td style="background:#eee; border-bottom:1px solid #888" colspan="2" align="center">[http://www.sabre-roads.org.uk/maps/index.php?view={{{lat|}}},{{#var:longitude}}&markers={{{lat|}}},{{#var:longitude}}&map=OSMMap&zoom=10&layer=0 '''Location Map''']</td></tr><tr><td style="background:#eee; border:0px solid #AFA3BF" colspan="2" align="center"> {{{sabremap}}} </td></tr><tr><td></td></tr><tr><td></td></tr>
 
            | {{#if: {{{lat|}}}
 
                  | {{#if: {{#varexists:longitude}}
 
                          | <tr><td style="background:#eee; border-bottom:1px solid #888" colspan="2" align="center">[http://www.sabre-roads.org.uk/maps/index.php?view={{{lat|}}},{{#var:longitude}}&markers={{{lat|}}},{{#var:longitude}}&map=OSMMap&zoom=10&layer=0 '''Location Map''']</td></tr><tr><td style="background:#eee; border:0px solid #AFA3BF" colspan="2" align="center"><sabremap lat={{{lat}}} lon={{#var:longitude}} zoom={{#var:mapzoom}} width=250 height={{{height}}}
 
                          {{#if: {{{layer|}}} | layer={{{layer}}} | }}
 
                          {{#if: {{{trace|}}} | trace={{{trace}}} | }}
 
                          {{#if: {{{static|}}} | static={{{static}}} | }}
 
                          /></td></tr><tr><td></td></tr><tr><td></td></tr>
 
                    }}
 
              }}
 
        }}
 
  }}<!--
 
 
 
Image and caption. The image width is defined by the width of the map, if there is no map, or the mapwidth is not given, it will default to 250px
 
-->{{#if: {{{image|}}}        | <tr><td colspan="2">[[Image:{{{image}}}|{{{mapwidth|250}}}px]]</td></tr>|<includeonly>[[Category:Needs Image]]</includeonly>}}<!--
 
-->{{#if: {{{caption|}}}       | <tr><td colspan="2" style="text-align:center;"><small>''{{{caption}}}''</small> }}<!--
 
 
 
Gallery icon and link to page's photo gallery
 
--><tr><td colspan="2" align="center">
 
{| width="100%" style="background-color:#F9F9F9;"
 
|style="padding-right:4px"|[[Image:Cameraicon.png|40px]]
 
|style="padding-left:4px;text-align:center;"|{{Get Pictures |
 
                                                    {{{gallery| {{PAGENAME}} }}}
 
                                            }}
 
|}</td></tr><!--
 
 
 
Show various tags dependent upon usage.  Separated this way to make the code more obvious.
 
-->{{InfoboxPartA| From                | {{{from|}}} }} <!--
 
-->{{InfoboxPartA| To                  | {{{to|}}} }} <!--
 
-->{{InfoboxPartA| Via                  | {{{via|}}} }} <!--
 
 
 
Add lists based around location and highway authorities
 
-->{{InfoboxPartB| Location                              | {{{location|}}} }} <!--
 
-->{{InfoboxPartB| County                                | {{{county|}}} }} <!--
 
-->{{InfoboxPartB| Country                                | {{{country|}}} }} <!--
 
-->{{InfoboxPartB| County                                | {{{traditional_county|}}} }} <!-- obsolete tag - provided for compatibility
 
-->{{InfoboxPartB| Ceremonial County                    | {{{ceremonial_county|}}} }} <!--
 
-->{{InfoboxPartB| Highway Authority                    | {{{authority|}}} }} <!--
 
-->{{InfoboxPartB| Primary Destinations                  | {{{primary_destinations|}}} }} <!--
 
-->{{InfoboxPartB| Terminal &amp; Intermediate Destinations  | {{{terminal_destinations|}}} }} <!--
 
-->{{InfoboxPartB| Other Important Destinations          | {{{non_primary_destinations|}}} }} <!--
 
-->{{InfoboxPartB| Current Highway Authorities          | {{{current_authority|}}} }} <!--
 
-->{{InfoboxPartB| Borders                              | {{{borders|}}} }} <!--
 
-->{{InfoboxPartB| Hill Type                            | {{{hill_type|}}} }} <!--
 
-->{{InfoboxPartB| Shed Type                            | {{{shedtype|}}} }} <!--
 
 
 
Add lists based around type of junction or scheme
 
-->{{InfoboxPartB| Junction Type                        | {{{junctiontype|}}} }} <!--
 
-->{{InfoboxPartB| Scheme Type                          | {{{contype|}}} }} <!--
 
 
 
Add parameters regarding construction, opening and closing
 
-->{{InfoboxPartB| Construction Start Date              | {{{start|}}} }} <!--
 
-->{{InfoboxPartB| Opening Date                          | {{{open|}}} }} <!--
 
-->{{InfoboxPartB| Built                                | {{{built|}}} }} <!--
 
-->{{InfoboxPartB| Official Opening                      | {{{official_opening|}}} }} <!--
 
-->{{InfoboxPartA| Closure Date                          | {{{closed|}}} }} <!--
 
-->{{InfoboxPartB| Cost                                  | {{{cost|}}} }} <!--
 
-->{{InfoboxPartB| Height of Wall                        | {{{height|}}} }} <!--
 
-->{{InfoboxPartB| Length of Wall                        | {{{length|}}} }} <!--
 
-->{{InfoboxPartB| Material                              | {{{material|}}} }} <!--
 
-->{{InfoboxPartB| Contractor                            | {{{contractor|}}} }} <!--
 
-->{{InfoboxPartB| Demolished                            | {{{demolished|}}} }} <!--
 
-->{{InfoboxPartB| Status                                | {{{status|}}} }} <!--
 
-->{{InfoboxPartB| Listed                                | {{{listed|}}} }} <!--
 
-->{{InfoboxPartB| Building                              | {{{building|}}} }} <!--
 
-->{{InfoboxPartB| Dates of Operation                    | {{{dates|}}} }} <!--
 
-->{{InfoboxPartB| Predecessor                          | {{{predecessor|}}} }} <!--
 
-->{{InfoboxPartB| Successor                            | {{{successor|}}} }} <!--
 
-->{{InfoboxPartB| Mouth                                | {{{mouth|}}} }} <!--
 
-->{{InfoboxPartB| Source                                | {{{source|}}} }} <!--
 
-->{{InfoboxPartB| Electrification                      | {{{electrification|}}} }} <!--
 
 
 
 
 
 
 
Add operator and fee parameters
 
-->{{InfoboxPartB| Current Operator                      | {{{operator|}}} }} <!--
 
-->{{InfoboxPartB| Former Operator(s)                    | {{{former_operator|}}} }} <!--
 
-->{{InfoboxPartB| Toll                                  | {{{toll|}}} }} <!--
 
-->{{InfoboxPartB| Crossing Type                        | {{{crossingtype|}}} }} <!--
 
 
 
Add parameters for road numbers
 
-->{{InfoboxPartB| Roads Joined                          | {{{roads|}}} }} <!--
 
-->{{InfoboxPartB| On road(s)                            | {{{road|}}} }} <!-- obsolete tag - provided for compatibility
 
-->{{InfoboxPartB| On road(s)                            | {{{number|}}} }} <!--
 
 
 
 
 
 
 
Add parameters for relevant nearby destinations
 
-->{{InfoboxPartB| Forward Destination on                | {{{primary_roads|}}} }} <!--
 
-->{{InfoboxPartB| Next Primary Destinations            | {{{next|}}} }} <!--
 
-->{{InfoboxPartB| Other Nearby Primary Destinations    | {{{near|}}} }} <!--
 
-->{{InfoboxPartB| Next Terminal & Intermediate Destinations            | {{{next_td|}}} }} <!--
 
-->{{InfoboxPartB| Nearby Terminal & Intermediate Destinations    | {{{near_td|}}} }} <!--
 
-->{{InfoboxPartB| Other Nearby Destinations            | {{{near_npd|}}} }} <!--
 
-->{{InfoboxPartB| local roads                          | {{{local_roads|}}} }} <!--
 
 
 
Add parameters for trunk and TfL roads
 
-->{{InfoboxPartB| Highways England Roads                | {{{HA_roads|}}} }} <!--
 
-->{{InfoboxPartB| Transport Scotland Roads              | {{{TS_roads|}}} }} <!--
 
-->{{InfoboxPartB| Welsh Assembly Roads                  | {{{TW_roads|}}} }} <!--
 
-->{{InfoboxPartB| Transport for London Roads            | {{{TfL_roads|}}} }} <!--
 
-->{{InfoboxPartB| National Roads Authority Roads        | {{{NRA_roads|}}} }} <!--
 
-->{{InfoboxPartB| NI Roads Service Roads                | {{{RS_roads|}}} }} <!--
 
 
 
 
 
Add parameters for trails
 
-->{{InfoboxPartB| Esablished              | {{{established|}}} }} <!--
 
-->{{InfoboxPartB| Designation              | {{{designation|}}} }} <!--
 
-->{{InfoboxPartB| Trail Heads              | {{{trailheads|}}} }} <!--
 
-->{{InfoboxPartB| Use                      | {{{use|}}} }} <!--
 
-->{{InfoboxPartB| Elevation Gain and Loss  | {{{elev_gain_and_loss|}}} }} <!--
 
-->{{InfoboxPartB| Elevation                | {{{elevation|}}} }} <!--
 
-->{{InfoboxPartB| Elevation Change        | {{{elev_change|}}} }} <!--
 
-->{{InfoboxPartB| Highest                  | {{{highest|}}} }} <!--
 
-->{{InfoboxPartB| Lowest                  | {{{lowest|}}} }} <!--
 
-->{{InfoboxPartB| Grade                    | {{{grade|}}} }} <!--
 
-->{{InfoboxPartB| Difficulty              | {{{difficulty|}}} }} <!--
 
-->{{InfoboxPartB| Season                  | {{{season|}}} }} <!--
 
-->{{InfoboxPartB| Months                  | {{{months|}}} }} <!--
 
-->{{InfoboxPartB| Sights                  | {{{sights|}}} }} <!--
 
-->{{InfoboxPartB| Hazards                  | {{{hazards|}}} }} <!--
 
-->{{InfoboxPartB| Surface                  | {{{surface|}}} }} <!--
 
-->{{InfoboxPartB| ROW                      | {{{ROW|}}} }} <!--
 
-->{{InfoboxPartB| Track Guage              | {{{guage|}}} }} <!--
 
 
 
Add parameters for transmitters
 
-->{{InfoboxPartB| Mast height                | {{{mast_height|}}} }} <!--
 
-->{{InfoboxPartB| Tower Height              | {{{tower_height|}}} }} <!--
 
-->{{InfoboxPartB| Power                      | {{{power|}}} }} <!--
 
-->{{InfoboxPartB| Relay                      | {{{relay|}}} }} <!--
 
-->{{InfoboxPartB| Tv Channels                | {{{tv_channels|}}} }} <!--
 
-->{{InfoboxPartB| Radio Channels            | {{{radio_channels|}}} }} <!--
 
-->{{InfoboxPartB| Fuel Type            | {{{fuel_type|}}} }} <!--
 
 
 
Add parameters for trigpoint
 
-->{{InfoboxPartB| Condition              | {{{condition|}}} }} <!--
 
-->{{InfoboxPartB| Flush Bracket                | {{{flush_bracket|}}} }} <!--
 
-->{{InfoboxPartB| OSGB36 Station              | {{{OSGB36_Station|}}} }} <!--
 
-->{{InfoboxPartB| T:UK waypoint                | {{{T:UK_waypoint|}}} }} <!--
 
-->{{InfoboxPartB| Historic Use                | {{{historic_use|}}} }} <!--
 
-->{{InfoboxPartB| Trig Type                | {{{trig_type|}}} }} <!--
 
-->{{InfoboxPartB| Staff                | {{{staff|}}} }} <!--
 
-->{{InfoboxPartB| Staff1              | {{{staff1|}}} }} <!--
 
 
 
 
 
Add a map at this point of the infobox, if the "maploc" tag is used with the value of "bottom".  "Maploc" is usually defined within the template that calls this one.
 
If "sabremap" tag is used, use that specifically; if no sabremap tag exists, build a map from SABRE Maps using various tags!  Uses the various variables defined on the earlier map section for zoom levels and longitude.
 
-->{{#if: {{{zoom|}}}|{{#vardefine:mapzoom|{{{zoom}}} }}|{{#vardefine:mapzoom|13}} }}<!--
 
-->{{#if: {{{lon|}}}|{{#vardefine:longitude|{{{lon}}} }} }}<!--
 
-->{{#if: {{{lng|}}}|{{#vardefine:longitude|{{{lng}}} }} }}<!--
 
 
 
-->{{#ifeq: {{{maploc|}}} | bottom |
 
      {{#if: {{{sabremap|}}} 
 
            | <tr><td style="background:#eee; border-bottom:1px solid #888" colspan="2" align="center">[http://www.sabre-roads.org.uk/maps/index.php?view={{{lat|}}},{{#var:longitude}}&markers={{{lat|}}},{{#var:longitude}}&map=OSMMap&zoom=10&layer=0 '''Location Map''']</td></tr><tr><td style="background:#eee; border:0px solid #AFA3BF" colspan="2" align="center"> {{{sabremap}}} </td></tr><tr><td></td></tr><tr><td></td></tr>
 
            | {{#if: {{{lat|}}}
 
                  | {{#if: {{#varexists:longitude}}
 
                          | <tr><td style="background:#eee; border-bottom:1px solid #888" colspan="2" align="center">[http://www.sabre-roads.org.uk/maps/index.php?view={{{lat|}}},{{#var:longitude}}&markers={{{lat|}}},{{#var:longitude}}&map=OSMMap&zoom=10&layer=0 '''Location Map''']</td></tr><tr><td style="background:#eee; border:0px solid #AFA3BF" colspan="2" align="center"><sabremap lat={{{lat}}} lon={{#var:longitude}} zoom={{#var:mapzoom}} width=250 height={{{height}}}
 
                          {{#if: {{{layer|}}} | layer={{{layer}}} | }}
 
                          {{#if: {{{trace|}}} | trace={{{trace}}} | }}
 
                          {{#if: {{{static|}}} | static={{{static}}} | }}
 
                          /></td></tr><tr><td></td></tr><tr><td></td></tr>
 
                    }}
 
              }}
 
        }}
 
  }}<!--
 
 
 
 
 
Related pages
 
-->{{#if: {{{relcat|}}} |
 
          {{#if: {{{rel1|}}}
 
              | {{#dpl:
 
                  |resultsheader=<tr><td style="background:#eee; border-bottom:1px solid #888" colspan="2" align="center">'''{{{relname|Places}}} related to the {{{rel1}}}'''</td></tr><tr><td style="background:#eee; border:0px solid #AFA3BF" colspan="2" align="center">
 
                  |noresultsheader= <tr style="display:none;"><td>
 
                  |category={{{rel1}}}&{{{relcat|}}}
 
                  |namespace=
 
                  |allowcachedresults=false
 
                  |mode=inline
 
                  |inlinetext=&nbsp;&bull;&#32;
 
                  |resultsfooter=</td></tr>
 
                }}
 
          }}
 
          {{#if: {{{rel2|}}}
 
              | {{#dpl:
 
                  |resultsheader=<tr><td style="background:#eee; border-bottom:1px solid #888" colspan="2" align="center">'''{{{relname|Places}}} related to the {{{rel2}}}'''</td></tr><tr><td style="background:#eee; border:0px solid #AFA3BF" colspan="2" align="center">
 
                  |noresultsheader= <tr style="display:none;"><td>
 
                  |category={{{rel2}}}&{{{relcat|}}}
 
                  |namespace=
 
                  |allowcachedresults=false
 
                  |mode=inline
 
                  |inlinetext=&nbsp;&bull;&#32;
 
                  |resultsfooter=</td></tr>
 
                }}
 
          }}
 
          {{#if: {{{rel3|}}}
 
              | {{#dpl:
 
                  |resultsheader=<tr><td style="background:#eee; border-bottom:1px solid #888" colspan="2" align="center">'''{{{relname|Places}}} related to the {{{rel3}}}'''</td></tr><tr><td style="background:#eee; border:0px solid #AFA3BF" colspan="2" align="center">
 
                  |noresultsheader= <tr style="display:none;"><td>
 
                  |category={{{rel3}}}&{{{relcat|}}}
 
                  |namespace=
 
                  |allowcachedresults=false
 
                  |mode=inline
 
                  |inlinetext=&nbsp;&bull;&#32;
 
                  |resultsfooter=</td></tr>
 
                }}
 
          }}
 
            }}
 
          {{#if: {{{rel4|}}}
 
              | {{#dpl:
 
                  |resultsheader=<tr><td style="background:#eee; border-bottom:1px solid #888" colspan="2" align="center">'''{{{relname|Places}}} related to the {{{rel4}}}'''</td></tr><tr><td style="background:#eee; border:0px solid #AFA3BF" colspan="2" align="center">
 
                  |noresultsheader= <tr style="display:none;"><td>
 
                  |category={{{rel4}}}&{{{relcat|}}}
 
                  |namespace=
 
                  |allowcachedresults=false
 
                  |mode=inline
 
                  |inlinetext=&nbsp;&bull;&#32;
 
                  |resultsfooter=</td></tr>
 
                }}
 
          }} 
 
          {{#if: {{{rel5|}}}
 
              | {{#dpl:
 
                  |resultsheader=<tr><td style="background:#eee; border-bottom:1px solid #888" colspan="2" align="center">'''{{{relname|Places}}} related to the {{{rel5}}}'''</td></tr><tr><td style="background:#eee; border:0px solid #AFA3BF" colspan="2" align="center">
 
                  |noresultsheader= <tr style="display:none;"><td>
 
                  |category={{{rel5}}}&{{{relcat|}}}
 
                  |namespace=
 
                  |allowcachedresults=false
 
                  |mode=inline
 
                  |inlinetext=&nbsp;&bull;&#32;
 
                  |resultsfooter=</td></tr>
 
                }}
 
          }}<!--
 
 
 
Place related items in correct categories
 
-->{{#if: {{{rel1|}}} | [[Category:{{{rel1|}}}]] }}{{#if: {{{rel2|}}} | [[Category:{{{rel2|}}}]] }}{{#if: {{{rel3|}}} | [[Category:{{{rel3|}}}]] }}{{#if: {{{rel4|}}} | [[Category:{{{rel4|}}}]] }}{{#if: {{{rel5|}}} | [[Category:{{{rel5|}}}]] }}<!--
 
 
 
--></table>
 

Latest revision as of 23:49, 16 October 2020

Template documentation[create]