Content deleted Content added
BrandonXLF (talk | contribs) Testing |
BrandonXLF (talk | contribs) Added examples |
||
Line 12:
In this example, the called template gives no arguments to the template being called.
'''Parent:''' <
'''Template:''' <
'''Result:''' {{#invoke:Sandbox/BrandonXLF|main|_t=
In this example, the called template alters the 3rd parameter
'''Parent:''' <
'''Template:''' <
'''Result:''' {{#invoke:Sandbox/BrandonXLF|main|_t=
In this example, the called template alters the 3rd parameter, but the parent doesn't define it
'''Parent:''' <
'''Template:''' <
'''Result:''' {{#invoke:Sandbox/BrandonXLF|main|_t=
=== 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|main|_t=Jcon|hwy|city={{{city|[[Toronto]]}}}}}</pre>
'''Result:''' {{#invoke:Sandbox/BrandonXLF|main|_t=Jcon|hwy|416|city=[[Ottawa]]}}
Without ''x'' specified:
'''Parent:''' <pre>{{TEMPLATE|2=416}}</pre>
'''Template:''' <pre>{{#invoke:Sandbox/BrandonXLF|main|_t=Jcon|hwy|416|city={{{city|[[Toronto]]}}}}}</pre>
'''Result:''' {{#invoke:Sandbox/BrandonXLF|main|_t=Jcon|hwy|416|city=[[Toronto]]}}
|