Module:Sandbox/BrandonXLF/1/doc: Difference between revisions

Content deleted Content added
No edit summary
 
(17 intermediate revisions by the same user not shown)
Line 1:
{{notice|Please do not delete this module or its doc page.}}
{{lmd|All parameters}} Calls a template while giving it all the arguments the current page receives.
 
Arguments directly given to the module are prioritized over ones given to the current page.
 
== Parameters ==
<code>''(floor#)''</code> - Sets the name of a floor
 
<code>''(floor#)''_''(part#)''_''(param)''</code> - Sets a parameter for a row of a floor where <code>''(param)''</code> is:
* {{para|_t}} The template to call
* <code>name</code> - The name of the row, e.g. "Westbound track"
* {{para|''x''}} ''x'' represents any parameter, parameter ''x'' will be send to the template that is called.
* <code>desc</code> - The description for the row
 
* '''Services'''
== Examples ==
** <code>dir</code> - The direction of the service(s) for the track (<code>right</code> or <code>left</code>)
 
** <code>service</code> - The service running on the track
In this example, the called template gives no arguments to the template being called.
** <code>service''(service#)''</code> - Additional services running on the track
 
** <code>dest</code> - The destination for the service
'''Parent:''' <pre>{{TEMPLATE|Foo|Bar|Baz}}</pre>
** <code>dest''(service#)''</code> - Destinations for the additional services
 
** <code>note</code> - Note about the services
'''Template:''' <pre>{{#invoke:Sandbox/BrandonXLF/1|main|_t=See also}}</pre>
** <code>note''(service#)''</code> - Notes about the additional services
 
* '''Platform'''
'''Result:''' {{#invoke:Sandbox/BrandonXLF/1|main|_t=See also|Foo|Bar|Baz}}
** <code>platform</code> - The type of platform
 
** <code>accessible</code> - Set if the platform is {{access icon|alt=}} [[accessible]]
In this example, the called template alters the 3rd parameter
** <code>note</code> - Note about the platform
 
'''Parent:''' <pre>{{TEMPLATE|Foo|Bar|Baz}}</pre>
 
'''Template:''' <pre>{{#invoke:Sandbox/BrandonXLF/1|main|_t=See also|Foobar}}</pre>
 
'''Result:''' {{#invoke:Sandbox/BrandonXLF/1|main|_t=See also|Foo|Bar|Foobar}}
 
In this example, the called template alters the 3rd parameter, but the parent doesn't define it
 
'''Parent:''' <pre>{{TEMPLATE|Foo|Bar}}</pre>
 
'''Template:''' <pre>{{#invoke:Sandbox/BrandonXLF/1|main|_t=See also|Foobar}}</pre>
 
'''Result:''' {{#invoke:Sandbox/BrandonXLF/1|main|_t=See also|Foo|Bar|Foobar}}
 
=== Default ===
 
To specify a default value you can use <code>{{!}}''x'' = {{(((}}''x''{{!}}''default''{{)))}}</code>.
 
With ''x'' specified:
 
'''Parent:''' <pre>{{TEMPLATE|2=416|city=[[Ottawa]]}}</pre>
 
'''Template:''' <pre>{{#invoke:Sandbox/BrandonXLF/1|main|_t=Jcon|hwy|city={{{city|[[Toronto]]}}}}}</pre>
 
'''Result:''' {{#invoke:Sandbox/BrandonXLF/1|main|_t=Jcon|hwy|416|city=[[Ottawa]]}}
 
Without ''x'' specified:
 
'''Parent:''' <pre>{{TEMPLATE|2=416}}</pre>
 
'''Template:''' <pre>{{#invoke:Sandbox/BrandonXLF/1|main|_t=Jcon|hwy|416|city={{{city|[[Toronto]]}}}}}</pre>
 
'''Result:''' {{#invoke:Sandbox/BrandonXLF/1|main|_t=Jcon|hwy|416|city=[[Toronto]]}}