Difference between revisions of "Template:Tab-DAR"

From Transit.Wiki
m
m
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#vardefine:shownum|{{#ifexpr:{{{num|0}}}<1||{{{num|}}}}}}}
+
<includeonly>{{#vardefine:shownum|{{{prefix|}}}{{#ifexpr:{{{num|0}}}<1||{{{num|}}}}}{{{alpha|}}}}}
 
<h1>{{#replace:{{#var:shownum}}{{{letter|}}}|/|-}}</h1>
 
<h1>{{#replace:{{#var:shownum}}{{{letter|}}}|/|-}}</h1>
<h3>{{{fullname|{{#var:1provider}} {{#var:shownum}}{{{letter|}}}}}}</h3>
+
<h3>{{{fullname|{{#var:1provider}} {{#if:{{#var:shownum}}|Route {{#var:shownum}}}}{{{letter|}}}}}}</h3>
 
<div class="routeinfo">{{{to|}}}</div>
 
<div class="routeinfo">{{{to|}}}</div>
 
<div style="padding:1.25em;">[{{{link}}} Map and schedule]</div>
 
<div style="padding:1.25em;">[{{{link}}} Map and schedule]</div>
Line 7: Line 7:
  
 
<div>{{{note|}}}</div>
 
<div>{{{note|}}}</div>
<h2>Points of interest</h2>
+
{{#arraydefine:DAR areas|{{{DAR areas|}}}|{{{altsep|,}}}}}{{#ifeq:{{#arraysize:DAR areas}}|0||<h2>Communities</h2>|}}
 +
{{#arrayprint:DAR areas||$1|<nowiki/>
 +
* [[$1]]}}
 +
 
 
{{#ask: [[City.-DAR area::{{PAGENAME}}#{{#replace:{{#var:shownum}}{{{letter|}}}|/|-}}]] OR [[In county.-DAR area::{{PAGENAME}}#{{#replace:{{#var:shownum}}{{{letter|}}}|/|-}}]]
 
{{#ask: [[City.-DAR area::{{PAGENAME}}#{{#replace:{{#var:shownum}}{{{letter|}}}|/|-}}]] OR [[In county.-DAR area::{{PAGENAME}}#{{#replace:{{#var:shownum}}{{{letter|}}}|/|-}}]]
|format=ul
+
|format=ul|intro=<h2>Points of interest</h2>
 
}}
 
}}
  
 
{{#subobject:{{#replace:{{#var:shownum}}{{{letter|}}}|/|-}}
 
{{#subobject:{{#replace:{{#var:shownum}}{{{letter|}}}|/|-}}
 
|provider={{{provider|{{#var:1provider}}}}}
 
|provider={{{provider|{{#var:1provider}}}}}
 +
|rpref={{{prefix|'}}}
 
|rnum={{{num|0}}}
 
|rnum={{{num|0}}}
 
|rlet={{{letter|'}}}
 
|rlet={{{letter|'}}}
|rfull={{{fullname|{{#var:1provider}} {{#var:shownum}}{{{letter|}}}}}}
+
|rvalue={{#if:{{#var:shownum}}|{{#var:shownum}}}}{{{letter|}}}
 +
|rfull={{{fullname|{{#var:1provider}} {{#if:{{#var:shownum}}|Route {{#var:shownum}}}}{{{letter|}}}}}}
 
|rtype={{{type|dial-a-ride}}}
 
|rtype={{{type|dial-a-ride}}}
 
|to={{{to|}}}
 
|to={{{to|}}}
 
|servicespan={{{servicespan|7 days a week. Holiday service varies.}}}
 
|servicespan={{{servicespan|7 days a week. Holiday service varies.}}}
|pcategory={{{pcategory|{{#var:1provider}} routes}}}
+
|@category={{{pcategory|{{#var:1provider}} routes}}}
|DAR area={{{DAR areas|}}}|+sep=,
+
|DAR area={{{DAR areas|}}}|+sep={{{altsep|,}}}
|DAR area={{#if:{{{DAR county|}}}|{{#ask: [[In county::{{{DAR county|}}}]] [[city latlong::+]] {{{condition|}}}|format=list|link=none|outro=,}}{{{DAR county|}}}|}}|+sep=,
+
|DAR area={{#if:{{{DAR county|}}}|{{#ask: [[In county::{{{DAR county|}}}]] [[city latlong::+]] {{{condition|}}}|format=list|link=none|sep=;|outro=;}}{{{DAR county|}}}|}}|+sep=;
 +
|Place={{#ask: [[City.-DAR area::{{PAGENAME}}#{{#replace:{{#var:shownum}}{{{letter|}}}|/|-}}]] OR [[In county.-DAR area::{{PAGENAME}}#{{#replace:{{#var:shownum}}{{{letter|}}}|/|-}}]] [[latlong::+]]|format=plainlist|sep=;|link=none|limit=200}}|+sep=;
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
Another way to input routes in a tab format for smaller systems.
+
Another way to input DAR services in a tab format for smaller systems.
  
 
Full list:
 
Full list:
 
<pre>
 
<pre>
{{tab-routes
+
{{tab-DAR
 
|provider=
 
|provider=
|num=
+
|prefix= (remove entire line if not needed)
|letter=
+
|num= (remove entire line if not needed)
 +
|alpha= (remove entire line if not needed)
 +
|letter= (remove entire line if not needed)
 
|fullname=
 
|fullname=
 
|type=
 
|type=
Line 39: Line 47:
 
|servicespan=
 
|servicespan=
 
|note=
 
|note=
|places=
+
|DAR areas=
 +
|DAR county=
 +
|condition= (e.g. [[city name::!Lubbock]] to indicate exception)
 
}}
 
}}
 
</pre>
 
</pre>
  
Places are to be separated by comma.
+
DAR areas are to be separated by comma.
  
 
Minimal list:
 
Minimal list:
 
<pre>
 
<pre>
{{tab-routes
+
{{tab-DAR
|num=
+
|num= (remove entire line if not needed)
|letter=
+
|letter= (remove entire line if not needed)
 
|to=
 
|to=
 
|link=
 
|link=
 
|servicespan=
 
|servicespan=
|places=
+
|note=
 +
|DAR areas=
 
}}
 
}}
 
</pre>
 
</pre>

Latest revision as of 11:34, 10 February 2024

Another way to input DAR services in a tab format for smaller systems.

Full list:

{{tab-DAR
|provider=
|prefix= (remove entire line if not needed)
|num= (remove entire line if not needed)
|alpha= (remove entire line if not needed)
|letter= (remove entire line if not needed)
|fullname=
|type=
|pcategory=
|to=
|link=
|servicespan=
|note=
|DAR areas=
|DAR county=
|condition= (e.g. [[city name::!Lubbock]] to indicate exception)
}}

DAR areas are to be separated by comma.

Minimal list:

{{tab-DAR
|num= (remove entire line if not needed)
|letter= (remove entire line if not needed)
|to=
|link=
|servicespan=
|note=
|DAR areas=
}}

Set common provider for all routes on this page through

{{#vardefine:1provider|$1}}