Jump to content

Template:Infobox road: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
tweaked maint handling per request on talk; also fixed a bug with the route information header
bypass /country and /browse/<country> templates
Line 5: Line 5:
|belowstyle=line-height:150%
|belowstyle=line-height:150%
<!-- ROUTE MARKER AND ROUTE NAME -->
<!-- ROUTE MARKER AND ROUTE NAME -->
|above={{#if:{{{marker_image|}}}|{{#ifeq:{{{marker_image|}}}|none||<p style="margin:0 0 4px 0">{{{marker_image}}}</p>}}|{{#if:{{{state|{{{province|{{{country|}}}}}}}}}|{{#switch:{{Infobox road/country|cat=shieldmain|country={{{country|}}}|province={{{province|}}}|state={{{state|}}}|type={{{type|}}}|county={{{county|}}}|route={{{route|}}}|subtype={{Infobox road/meta/mask/subtype1|{{{subtype|}}}}}}}|none|[[File:none]]=|#default=<p style="margin:0 0 4px 0">{{Infobox road/country|cat=shieldmain|country={{{country|}}}|province={{{province|}}}|state={{{state|}}}|type={{{type|}}}|county={{{county|}}}|route={{{route|}}}|subtype={{Infobox road/meta/mask/subtype1|{{{subtype|}}}}}}}</p>}}}}}}
|above={{#if:{{{marker_image|}}}|{{#ifeq:{{{marker_image|}}}|none||<p style="margin:0 0 4px 0">{{{marker_image}}}</p>}}|{{#if:{{{state|{{{province|{{{country|}}}}}}}}}|{{#switch:{{Infobox road/shieldmain/{{Infobox road/meta/mask/country|{{{state|}}}{{{province|}}}|{{{country|}}}}}|province={{{province|}}}|state={{{state|}}}|type={{{type|}}}|county={{{county|}}}|route={{{route|}}}|subtype={{Infobox road/meta/mask/subtype1|{{{subtype|}}}}}}}|none|[[File:none]]=|#default=<p style="margin:0 0 4px 0">{{Infobox road/shieldmain/{{Infobox road/meta/mask/country|{{{state|}}}{{{province|}}}|{{{country|}}}}}|province={{{province|}}}|state={{{state|}}}|type={{{type|}}}|county={{{county|}}}|route={{{route|}}}|subtype={{Infobox road/meta/mask/subtype1|{{{subtype|}}}}}}}</p>}}}}}}
{{#if:{{{name|}}}|{{{name}}}|{{#if:{{{state|{{{province|{{{country|}}}}}}}}}|{{#ifeq:{{Infobox road/country|cat=name|country={{{country|}}}|province={{{province|}}}|state={{{state|}}}|type={{{type|}}}|subtype={{Infobox road/meta/mask/subtype1|{{{subtype|}}}}}|route={{{route}}}|county={{{county|}}}}}|none||{{Infobox road/country|cat=name|country={{{country|}}}|province={{{province|}}}|state={{{state|}}}|type={{{type|}}}|subtype={{Infobox road/meta/mask/subtype1|{{{subtype|}}}}}|route={{{route}}}|county={{{county|}}}}}|}}}}}}
{{#if:{{{name|}}}|{{{name}}}|{{#if:{{{state|{{{province|{{{country|}}}}}}}}}|{{#ifeq:{{Infobox road/name/{{Infobox road/meta/mask/country|{{{state|}}}{{{province|}}}|{{{country|}}}}}|province={{{province|}}}|state={{{state|}}}|type={{{type|}}}|subtype={{Infobox road/meta/mask/subtype1|{{{subtype|}}}}}|route={{{route}}}|county={{{county|}}}}}|none||{{Infobox road/name/{{Infobox road/meta/mask/country|{{{state|}}}{{{province|}}}|{{{country|}}}}}|province={{{province|}}}|state={{{state|}}}|type={{{type|}}}|subtype={{Infobox road/meta/mask/subtype1|{{{subtype|}}}}}|route={{{route}}}|county={{{county|}}}}}|}}}}}}
|subheader={{#if:{{{translation|}}}|<big>{{{translation}}}</big>|{{#ifexist:Template:Infobox road/translation/{{Infobox road/meta/mask/country|{{{state|}}}{{{province|}}}|{{{country|}}}}}|<big>{{Infobox road/translation/{{Infobox road/meta/mask/country|{{{state|}}}{{{province|}}}|{{{country|}}}}}|province={{{province|}}}|state={{{state|}}}|type={{{type|}}}|subtype={{{subtype|}}}|route={{{route|}}}}}</big>|}}}}
|subheader={{{alternate_name|}}}
|subheader2={{{alternate_name|}}}
<!-- MAP -->
<!-- MAP -->
|image={{#ifeq:{{{map_custom|}}}|yes|<span style="white-space:nowrap;">{{{map|}}}</span>|{{#if:{{{map|}}}|[[File:{{{map}}}|290x172px|alt={{{map_alt|}}}]]|}}}}
|image={{#ifeq:{{{map_custom|}}}|yes|<span style="white-space:nowrap;">{{{map|}}}</span>|{{#if:{{{map|}}}|[[File:{{{map}}}|290x172px|alt={{{map_alt|}}}]]|}}}}
Line 15: Line 16:
|data2 = {{#if:{{{spur_of|}}}|{{Infobox road/meta/spur of|{{{type|}}}|{{{subtype|}}}|{{{spur_type|}}}|{{{spur_of}}}|{{{country|}}}|{{{province|}}}|{{{state|}}}|{{{county|}}}}}|}}
|data2 = {{#if:{{{spur_of|}}}|{{Infobox road/meta/spur of|{{{type|}}}|{{{subtype|}}}|{{{spur_type|}}}|{{{spur_of}}}|{{{country|}}}|{{{province|}}}|{{{state|}}}|{{{county|}}}}}|}}
|data3 = {{#if:{{{section|}}}|{{Infobox road/law/{{Infobox road/meta/mask/country|{{{state|}}}{{{province|}}}|{{{country|}}}}}|province={{{province|}}}|state={{{state|}}}|type={{{type|}}}|route={{{route}}}|section={{{section}}}|subsection={{{subsection|}}}}}|}}
|data3 = {{#if:{{{section|}}}|{{Infobox road/law/{{Infobox road/meta/mask/country|{{{state|}}}{{{province|}}}|{{{country|}}}}}|province={{{province|}}}|state={{{state|}}}|type={{{type|}}}|route={{{route}}}|section={{{section}}}|subsection={{{subsection|}}}}}|}}
|data5 = {{#if:{{{maint|}}}|{{#ifeq:{{{maint|}}}|none||Maintained by {{{maint}}}}}|{{#ifexist:Template:Infobox road/maint/{{Infobox road/meta/mask/country|{{{state|}}}{{{province|}}}|{{{country|}}}}}|{{Infobox road/country|cat=maint|country={{{country|}}}|province={{{province|}}}|state={{{state|}}}|type={{{type|}}}}}|}}}}
|data5 = {{#if:{{{maint|}}}|{{#ifeq:{{{maint|}}}|none||Maintained by {{{maint}}}}}|{{#ifexist:Template:Infobox road/maint/{{Infobox road/meta/mask/country|{{{state|}}}{{{province|}}}|{{{country|}}}}}|{{Infobox road/maint/{{Infobox road/meta/mask/country|{{{state|}}}{{{province|}}}|{{{country|}}}}}|province={{{province|}}}|state={{{state|}}}|type={{{type|}}}}}|}}}}
|data6 = {{#if:{{{era|}}}{{{time_period|}}}|{{#if:{{{established_by|}}}|Established by {{{established_by}}}|}}|}}
|data6 = {{#if:{{{era|}}}{{{time_period|}}}|{{#if:{{{established_by|}}}|Established by {{{established_by}}}|}}|}}
|label7 = Length:
|label7 = Length:
Line 101: Line 102:
|data72 = {{{system|}}}
|data72 = {{{system|}}}
<!-- LINKS AND BROWSE SECTION -->
<!-- LINKS AND BROWSE SECTION -->
|below = {{#if:{{{state|}}}{{{province|}}}{{{country|}}}{{{type|}}}|{{#ifeq:{{Infobox road/country|cat=browselinks|state={{{state|}}}|province={{{province|}}}|country={{{country|}}}|type={{{type|}}}|route={{{route|}}}|county={{{county|}}}}}|none||<p style="margin-top:0">{{Infobox road/country|cat=browselinks|state={{{state|}}}|province={{{province|}}}|country={{{country|}}}|type={{{type|}}}|route={{{route|}}}|county={{{county|}}}}}</p>}}}}<!--
|below = {{#if:{{{state|}}}{{{province|}}}{{{country|}}}{{{type|}}}|{{#ifeq:{{Infobox road/browselinks/{{Infobox road/meta/mask/country|{{{state|}}}{{{province|}}}|{{{country|}}}}}|province={{{province|}}}|state={{{state|}}}|type={{{type|}}}|county={{{county|}}}|route={{{route|}}}}}|none||<p style="margin-top:0">{{Infobox road/browselinks/{{Infobox road/meta/mask/country|{{{state|}}}{{{province|}}}|{{{country|}}}}}|province={{{province|}}}|state={{{state|}}}|type={{{type|}}}|county={{{county|}}}|route={{{route|}}}}}</p>}}}}<!--
-->{{#if:{{{previous_route|}}}{{{browse|}}}|{{Infobox road/country|cat=browse|state={{{state|}}}|province={{{province|}}}|country={{{country|}}}|type={{{type|}}}|route={{{route|}}}|county={{{county|}}}|previous_type={{{previous_type|}}}|previous_route={{{previous_route|}}}|browse_route={{{browse_route|}}}|next_type={{{next_type|}}}|next_route={{{next_route|}}}|previous_dab={{{previous_dab|}}}|next_dab={{{next_dab|}}}|browse={{{browse|}}}}}}}
-->{{#if:{{{previous_route|}}}{{{browse|}}}|<table style="width:100%; background:none; border-collapse:collapse">{{#if:{{{previous_route|}}}|
{{Infobox road/meta/browse|country={{Infobox road/meta/mask/country|{{{state|}}}{{{province|}}}|{{{country|}}}}}|state={{{state|}}}|province={{{province|}}}|county={{{county|}}}|previous_type={{{previous_type|}}}|previous_route={{{previous_route|}}}|browse_route={{{browse_route|}}}|next_type={{{next_type|}}}|next_route={{{next_route|}}}|previous_dab={{{previous_dab|}}}|next_dab={{{next_dab|}}}}}|}}
{{#if:{{{browse|}}}|{{{browse}}}|}}</table>|}}
}}{{#if:{{{type|}}}|{{#if:{{{state|}}}{{{province|}}}{{{country|}}}||[[Category:Infobox road transclusion errors]]}}}}{{#if:{{{spur_of|}}}|{{#if:{{{spur_type|}}}||[[Category:Infobox road transclusion errors]]}}}}{{#if:{{{countries|}}}|{{#ifeq:{{Infobox road/hide/countries|{{{state|}}}{{{province|}}}|{{{country|}}}}}|yes|[[Category:Infobox road transclusions with locally invalid parameters]]|}}|}}{{#if:{{{regions|}}}|{{#ifeq:{{Infobox road/hide/regions|{{{state|}}}{{{province|}}}|{{{country|}}}}}|yes|[[Category:Infobox road transclusions with locally invalid parameters]]|}}|}}{{#if:{{{provinces|}}}|{{#ifeq:{{Infobox road/hide/provinces|{{{state|}}}{{{province|}}}|{{{country|}}}}}|yes|[[Category:Infobox road transclusions with locally invalid parameters]]|}}|}}{{#if:{{{rural_municipalities|}}}|{{#ifeq:{{Infobox road/hide/ruralmuni|{{{state|}}}{{{province|}}}|{{{country|}}}}}|yes|[[Category:Infobox road transclusions with locally invalid parameters]]|}}|}}{{#if:{{{cities|}}}{{{towns|}}}{{{villages|}}}|{{#ifeq:{{Infobox road/hide/cities|{{{state|}}}{{{province|}}}|{{{country|}}}}}|yes|[[Category:Infobox road transclusions with locally invalid parameters]]|}}|}}<noinclude>
}}{{#if:{{{type|}}}|{{#if:{{{state|}}}{{{province|}}}{{{country|}}}||[[Category:Infobox road transclusion errors]]}}}}{{#if:{{{spur_of|}}}|{{#if:{{{spur_type|}}}||[[Category:Infobox road transclusion errors]]}}}}{{#if:{{{countries|}}}|{{#ifeq:{{Infobox road/hide/countries|{{{state|}}}{{{province|}}}|{{{country|}}}}}|yes|[[Category:Infobox road transclusions with locally invalid parameters]]|}}|}}{{#if:{{{regions|}}}|{{#ifeq:{{Infobox road/hide/regions|{{{state|}}}{{{province|}}}|{{{country|}}}}}|yes|[[Category:Infobox road transclusions with locally invalid parameters]]|}}|}}{{#if:{{{provinces|}}}|{{#ifeq:{{Infobox road/hide/provinces|{{{state|}}}{{{province|}}}|{{{country|}}}}}|yes|[[Category:Infobox road transclusions with locally invalid parameters]]|}}|}}{{#if:{{{rural_municipalities|}}}|{{#ifeq:{{Infobox road/hide/ruralmuni|{{{state|}}}{{{province|}}}|{{{country|}}}}}|yes|[[Category:Infobox road transclusions with locally invalid parameters]]|}}|}}{{#if:{{{cities|}}}{{{towns|}}}{{{villages|}}}|{{#ifeq:{{Infobox road/hide/cities|{{{state|}}}{{{province|}}}|{{{country|}}}}}|yes|[[Category:Infobox road transclusions with locally invalid parameters]]|}}|}}<noinclude>
{{Documentation}}
{{Documentation}}

Revision as of 05:12, 11 July 2010