Template:TL
From TrainzOnline
(Difference between revisions)
(port from WIkibook Trainz project and adapt for TrainzOnline namespace) |
(fix for this site to TOL namespaces, not subpages) |
||
Line 1: | Line 1: | ||
− | [[TrainzOnline | + | [[TrainzOnline:{{{3|}}}{{{1}}}|{{{2|{{{1}}}}}}]]<noinclude> |
[[Category:Self-documenting templates|{{PAGENAME}}]] | [[Category:Self-documenting templates|{{PAGENAME}}]] | ||
[[Category:Internal link templates|{{PAGENAME}}]] | [[Category:Internal link templates|{{PAGENAME}}]] | ||
Line 5: | Line 5: | ||
<div style="background:#aadadf; border: 2px solid blue;"> | <div style="background:#aadadf; border: 2px solid blue;"> | ||
;usage | ;usage | ||
− | This template forms an internal link to the | + | This template forms an internal link to the TranzOnline pages with parameter <code><nowiki>{{{1}}}</nowiki></code>, and incorporates an option to access a sub-sub-page given the optional 3rd default parameter: <code> <nowiki>{{{3}}} </nowiki></code> as well allowing for as an optional pretty-link re-title parameter <code>'2' allowing <nowiki>{{{2}}} and/or '|3=sub-page/' </nowiki></code> formatted link calls ... all forming the link and all links in the wiki-markup as:<br/> |
− | * <code> <nowiki>[[ | + | * <code> <nowiki>[[TrainzOnline:{{{3|}}}{{{1}}}|{{{2|{{{1}}}}}}]]</nowiki> </code> |
* Users unfamiliar with wiki-markup parameter parsing, just focus on <nowiki>{{{2}}} or '|2=text' </nowiki> overriding the presented text of the link, | * Users unfamiliar with wiki-markup parameter parsing, just focus on <nowiki>{{{2}}} or '|2=text' </nowiki> overriding the presented text of the link, | ||
* and <nowiki>{{{3}}}/ or '|3=sub-sub-linktext/' </nowiki> giving a prefix to a sub-sub-page, so <nowiki>{{{3}}}</nowiki>, | * and <nowiki>{{{3}}}/ or '|3=sub-sub-linktext/' </nowiki> giving a prefix to a sub-sub-page, so <nowiki>{{{3}}}</nowiki>, |
Latest revision as of 14:15, 13 July 2013
[[TrainzOnline:{{{1}}}|{{{1}}}]]
- usage
This template forms an internal link to the TranzOnline pages with parameter {{{1}}}
, and incorporates an option to access a sub-sub-page given the optional 3rd default parameter: {{{3}}}
as well allowing for as an optional pretty-link re-title parameter '2' allowing {{{2}}} and/or '|3=sub-page/'
formatted link calls ... all forming the link and all links in the wiki-markup as:
-
[[TrainzOnline:{{{3|}}}{{{1}}}|{{{2|{{{1}}}}}}]]
- Users unfamiliar with wiki-markup parameter parsing, just focus on {{{2}}} or '|2=text' overriding the presented text of the link,
- and {{{3}}}/ or '|3=sub-sub-linktext/' giving a prefix to a sub-sub-page, so {{{3}}},
- if and when given, MUST HAVE a trailing '/' to form a proper link.
Example-1, expanded paste down:
- This is because all template default parameters, formally 'numbered parameters' can also be specified like this:
{{TL |1=Tips And Tricks |2=Tips }} which wiki-markup language is processed exactly the same as {{TL |Tips And Tricks |Tips }}.
- caution
When using a template such as this which forms a link, it is best to NOT use spaces between the pipe characters "|" as done for clarity above.
Trainz User Tip: |
In-line Examples:
- {{TL|Tips And Tricks}} links as:
[[Trainz/Tips And Tricks|Tips And Tricks]]
and the other formulation:[[/Tips And Tricks|Tips And Tricks]]
both would.
- But... is much easier to edit around on a page when trying to get the best prose presentation.
- Similarly:
{{TL|Tips And Tricks|Tricks}}
links as if the constructs:[[TrainzOnline/Tips And Tricks|Tricks]]
and[[/Tips And Tricks|Tricks]]
which is perhaps part of the phrase you want. (This version may not yet work on TrainzOnline)
- Sub-subpage links will mainly be needed in the forthcoming Error fixing series of tutorials and the Programmed Instruction (Trainz A-Z) linked progressive tutorials off their own sub-TOC base page.
- Planned use of Sub-sub-pages... Better than splitting the book down the multiple tracks... we're going to make a lot of new pages in the PI tutorials! Whether for beginners or intermediate Trainzers, they'll all end in content creation and other advanced topics like TransDEM map generation anyway.