Template:Tweed bridges: Difference between revisions

From Wikishire
Jump to navigation Jump to search
RB (talk | contribs)
Created page with "{{#switch:{{{1}}} |1 |mouth |name=mouth |name 2= |n=1 |type=end }}|2 |Berwick Bridge |name=Berwick Bridge |name 2=Berwick Bridge |n=2 |type=b }}|3 |Royal Tweed Bridge |name=Ro..."
 
RB (talk | contribs)
No edit summary
Line 1: Line 1:
{{#switch:{{{1}}}
{{#vardefine:bn|{{#if:{{{1|}}}|{{Tweed bridge list|{{{1}}}|n}}|{{#switch:{{Tweed bridge list|{{PAGENAME}}|n}}
|1
|1=4
|mouth
|2=4
|name=mouth
|3=4
|name 2=
|46
|n=1
|47
|type=end
|48=45
}}|2
|{{Tweed bridge list|{{PAGENAME}}|n}} }} }} }}{{#vardefine:b-3|{{#ifeq:{{Tweed bridge list|{{#expr:{{#var:bn}}-3}}|name 2}}||{{ifif|{{Tweed bridge list|{{#expr:{{#var:bn}}-3}}|name}}}}|[[{{Tweed bridge list|{{#expr:{{#var:bn}}-3}}|name}}|{{Tweed bridge list|{{#expr:{{#var:bn}}-3}}|name 2}}]]}} }}{{#vardefine:b-2|{{#ifeq:{{Tweed bridge list|{{#expr:{{#var:bn}}-2}}|name 2}}||{{ifif|{{Tweed bridge list|{{#expr:{{#var:bn}}-2}}|name}}}}|[[{{Tweed bridge list|{{#expr:{{#var:bn}}-2}}|name}}|{{Tweed bridge list|{{#expr:{{#var:bn}}-2}}|name 2}}]]}} }}{{#vardefine:b-1|{{#ifeq:{{Tweed bridge list|{{#expr:{{#var:bn}}-1}}|name 2}}||{{ifif|{{Tweed bridge list|{{#expr:{{#var:bn}}-1}}|name}}}}|[[{{Tweed bridge list|{{#expr:{{#var:bn}}-1}}|name}}|{{Tweed bridge list|{{#expr:{{#var:bn}}-1}}|name 2}}]]}} }}{{#vardefine:b0|{{#ifeq:{{Tweed bridge list|{{#var:bn}}|name 2}}||{{ifif|{{Tweed bridge list|{{#var:bn}}|name}}}}|[[{{Tweed bridge list|{{#var:bn}}|name}}|{{Tweed bridge list|{{#var:bn}}|name 2}}]]}} }}{{#vardefine:b1|{{#ifeq:{{Tweed bridge list|{{#expr:{{#var:bn}}+1}}|name 2}}||{{ifif|{{Tweed bridge list|{{#expr:{{#var:bn}}+1}}|name}}}}|[[{{Tweed bridge list|{{#expr:{{#var:bn}}+1}}|name}}|{{Tweed bridge list|{{#expr:{{#var:bn}}+1}}|name 2}}]]}} }}{{#vardefine:b2|{{#ifeq:{{Tweed bridge list|{{#expr:{{#var:bn}}+2}}|name 2}}||{{ifif|{{Tweed bridge list|{{#expr:{{#var:bn}}+2}}|name}}}}|[[{{Tweed bridge list|{{#expr:{{#var:bn}}+2}}|name}}|{{Tweed bridge list|{{#expr:{{#var:bn}}+2}}|name 2}}]]}} }}{{#vardefine:b3|{{#ifeq:{{Tweed bridge list|{{#expr:{{#var:bn}}+3}}|name 2}}||{{ifif|{{Tweed bridge list|{{#expr:{{#var:bn}}+3}}|name}}}}|[[{{Tweed bridge list|{{#expr:{{#var:bn}}+3}}|name}}|{{Tweed bridge list|{{#expr:{{#var:bn}}+3}}|name 2}}]]}} }}
|Berwick Bridge
{| align="center" class="toccolours" width="100%" cellspacing="0" style="clear: all; margin-top: 0.5em"
|name=Berwick Bridge
|-
|name 2=Berwick Bridge
! bgcolor="#D0F0C0" align="center" colspan="7" | [[Crossings of the River Tweed|Bridges and crossings on the River Tweed]]
|n=2
|-align="center" style="font-size: 80%;"
|type=b
| {{#var:b3}} || {{#var:b2}} || {{#var:b1}} || {{#var:b0}} || {{#var:b-1}} || {{#var:b-2}} || {{#var:b-3}}
}}|3
|}<noinclude>{{documentation}}
|Royal Tweed Bridge
[[Category:Bottom boxes|Tweed bridges]]</noinclude>
|name=Royal Tweed Bridge
|name 2=Royal Tweed Bridge
|n=3
|type=b
}}|4
|Royal Border Bridge
|name=Royal Border Bridge
|name 2=Royal Border Bridge
|n=4
|type=b
}}|5
|Berwick Bypass Bridge
|name=Berwick Bypass Bridge
|name 2=Berwick Bypass Bridge
|n=5
|type=b
}}|6
|Union Bridge, Tweed
|name=Union Bridge, Tweed
|name 2=Union Bridge
|n=6
|type=f
}}|7
|Ladykirk and Norham Bridge
|name=Ladykirk and Norham Bridge
|name 2=Ladykirk and Norham Bridge
|n=7
|type=b
}}|8
|Coldstream Bridge
|name=Coldstream Bridge
|name 2=Coldstream Bridge
|n=8
|type=b
}}|9
|Hunter's Bridge
|name=Hunter's Bridge
|name 2=Hunter's Bridge
|n=9
|type=b
}}|10
|Kelso Bridge
|name=Kelso Bridge
|name 2=Kelso Bridge
|n=10
|type=b
}}|11
|Mertoun Bridge
|name=Mertoun Bridge
|name 2=Mertoun Bridge
|n=11
|type=b
}}|12
|Dryburgh Suspension Bridge
|name=Dryburgh Suspension Bridge
|name 2=Dryburgh Suspension Bridge
|n=12
|type=f
}}|13
|Leaderfoot Bridge
|name=Leaderfoot Bridge
|name 2=Leaderfoot Bridge
|n=13
|type=b
}}|14
|Drygrange Old Bridge
|name=Drygrange Old Bridge
|name 2=Drygrange Old Bridge
|n=14
|type=b
}}|15
|Leaderfoot Viaduct
|name=Leaderfoot Viaduct
|name 2=Leaderfoot Viaduct
|n=15
|type=v
}}|16
|Gattonside Suspension Bridge
|name=Gattonside Suspension Bridge
|name 2=Gattonside Suspension Bridge
|n=16
|type=f
}}|17
|Melrose Bridge
|name=Melrose Bridge
|name 2=Melrose Bridge
|n=17
|type=b
}}|18
|Redbridge Viaduct
|name=Redbridge Viaduct
|name 2=Redbridge Viaduct
|n=18
|type=v
}}|19
|Galafoot Bridge
|name=Galafoot Bridge
|name 2=Galafoot Bridge
|n=19
|type=b
}}|20
|Tweed Bridge, Galashiels
|name=Tweed Bridge, Galashiels
|name 2=Tweed Bridge
|n=20
|type=b
}}|21
|Yair Bridge
|name=Yair Bridge
|name 2=Yair Bridge
|n=21
|type=b
}}|22
|Ashiestiel Bridge
|name=Ashiestiel Bridge
|name 2=Ashiestiel Bridge
|n=22
|type=b
}}|23
|Walkerburn Bridge
|name=Walkerburn Bridge
|name 2=Walkerburn Bridge
|n=23
|type=b
}}|24
|Innerleithen Railway Bridge
|name=Innerleithen Railway Bridge
|name 2=Innerleithen Railway Bridge
|n=24
|type=v
}}|25
|Innerleithen Bridge
|name=Innerleithen Bridge
|name 2=Innerleithen Bridge
|n=25
|type=b
}}|26
|Cardrona Bridge
|name=Cardrona Bridge
|name 2=Cardrona Bridge
|n=26
|type=b
}}|27
|Cardrona Railway Bridge
|name=Cardrona Railway Bridge
|name 2=Cardrona Railway Bridge
|n=27
|type=v
}}|28
|Kailzie Bridge
|name=Kailzie Bridge
|name 2=Kailzie Bridge
|n=28
|type=f
}}|29
|Priorsford Footbridge
|name=Priorsford Footbridge
|name 2=Priorsford Footbridge
|n=29
|type=f
}}|30
|Tweed Bridge, Peebles
|name=Tweed Bridge, Peebles
|name 2=Tweed Bridge
|n=30
|type=b
}}|31
|Fotheringham Footbridge
|name=Fotheringham Footbridge
|name 2=Fotheringham Footbridge
|n=31
|type=f
}}|32
|Neidpath Viaduct
|name=Neidpath Viaduct
|name 2=Neidpath Viaduct
|n=32
|type=v
}}|33
|Manor Bridge, Peebles
|name=Manor Bridge, Peebles
|name 2=Manor Bridge
|n=33
|type=b
}}|34
|Stobo Bridge
|name=Stobo Bridge
|name 2=Stobo Bridge
|n=34
|type=b
}}|35
|Daywyck Mill Bridge
|name=Daywyck Mill Bridge
|name 2=Daywyck Mill Bridge
|n=35
|type=b
}}|36
|Crownhead Bridge
|name=Crownhead Bridge
|name 2=Crownhead Bridge
|n=36
|type=b
}}|37
|Merlindale Bridge
|name=Merlindale Bridge
|name 2=Merlindale Bridge
|n=37
|type=b
}}|38
|Easter Stanhope Bridge
|name=Easter Stanhope Bridge
|name 2=Easter Stanhope Bridge
|n=38
|type=b
}}|39
|Patervan Bridge
|name=Patervan Bridge
|name 2=Patervan Bridge
|n=39
|type=
}}|40
|Polmood Bridge
|name=Polmood Bridge
|name 2=Polmood Bridge
|n=40
|type=
}}|41
|Hearthstane Bridge
|name=Hearthstane Bridge
|name 2=Hearthstane Bridge
|n=41
|type=
}}|42
|Glennrusco Pipe Bridge
|name=Glennrusco Pipe Bridge
|name 2=Glennrusco Pipe Bridge
|n=42
|type=
}}|43
|Carlow's Bridge
|name=Carlow's Bridge
|name 2=Carlow's Bridge
|n=43
|type=b
}}|44
|Hawkshaw Bridge
|name=Hawkshaw Bridge
|name 2=Hawkshaw Bridge
|n=44
|type=
}}|45
|Grange Hill Bridge
|name=Grange Hill Bridge
|name 2=Grange Hill Bridge
|n=45
|type=
}}|46
|Fingland Bridge
|name=Fingland Bridge
|name 2=Fingland Bridge
|n=46
|type=
}}|47
|Tweedshaws Bridge
|name=Tweedshaws Bridge
|name 2=Tweedshaws Bridge
|n=47
|type=
}}|48
|Tweedswell
|name=Tweedswell
|name 2=Tweedswell
|n=48
|type=end
}}
}}<noinclude>
{{Tweed bridges/doc}}</noinclude>

Revision as of 19:41, 15 August 2020

Bridges and crossings on the River Tweed
Royal Tweed Bridge Berwick Bridge mouth
[edit] [{{#invoke:Purge|main}}] Template documentation

{{Tweed bridges}} is a bottom box that may be included at the foot of any article about a bridge on the River Tweed, from the Mouth of the river up to its source at Tweed's Well. It should show the bridge which the article concerns and the next three crossings each side, upstream and downstream (or in the case of one close to either end of the range, that end of the range).

The bottom box runs off a database template, {{Tweed bridge list}}. The text of this template was generated with a mail merge from an Excel file held by RB, so if a bridge has to be added or deleted, the merge should be re-run, to avoid having to renumber every data record.

(The '#switch' function at the start of {{Tweed bridges}} will also have to be adjusted if the number of data records increases or decreases.)

If the name of the Article does not match the name given in the data template {{Tweed bridge list}} (in the #switch:{{{1}}} function and as "name=") then it will not "catch" and the data (and the Excel file) should be changed. A short name can be given in "name 2=".

The bridge name will be shown on the list just in black if there is no corresponding article, but it will appear as a blue link when an article is created. If the "name 2=" field is filled in, it will appear as a link even if there is no article yet.