Last modified on 20 September 2014, at 21:27

Template:TL

Trainz

Template documentation[edit] [history] [purge]
logo
Fundamentals for Trainz Trainees
Trainz | Introductory Trainz  | Trainz AM&C | Creation | Appendixes  |  References  • Containers • Kinds • Tags • Index • Grps • Vers

UsageEdit

Note this \doc sub-page is included by more than one Trainz link templates, as representative of the family of similar templates using the same syntax to link different groups of pages.

Template {{TL}} code:

{{#if:{{{1|}}}|[[Trainz/(TabName){{{1}}}{{#if:{{{3|}}}|#{{{3|}}}}}
    |{{{p|{{{3|{{{2|{{{1}}}}}}}}}}}}]]
    |[[Trainz (TabName)|(TabName)]]
}}

The above code for {{TL}} has nothing where '(TabName)' snippet occurs, AND WHICH is characteristic of the other Trainz simple linking templates to book divisions.

  • Hence for 'containers' (TabName)=containers in {{TRC}} and the no argument link formed is to [[Trainz/containers|containers]] as can be seen in the header RHS bottom link.

 

General usage

This template forms an internal link to the Trainz wikibook with parameter {{{1}}}, and incorporates an option to access a section title on a page given the optional 3rd default parameter: {{{3}}} or just |3=somepage 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 wikimarkup as:

  •   [[Trainz/{{{1}}}{{#if:{{{3|}}}|#{{{3|}}}}}|{{{p|{{{3|{{{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.

P train grey.png
Spaces in the 'pretty-text' part are fine!

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:
[[Trainz/Tips And Tricks|Tricks]] and
[[/Tips And Tricks|Tricks]] which is perhaps part of the phrase you want.
  • Sub-subpage links will mainly be needed in the forthcoming Errorfixing 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.
http://en.m.wikibooks.org/wiki/Template:TL
en.m.wikibooks.org
crawl=CC-MAIN-2014-41
23816
application/http; msgtype=response
sha1:OUHVLIBFS567BGPSHH53FQKWV3QXKXMU
<urn:uuid:1a545910-43f8-490e-aa26-3ff2e4f70759>
2014-10-01T14:24:19Z
208.80.154.236
sha1:IPA3W75QLQMZDNP4OKDCVZOERXFOZCHE
<urn:uuid:ab74f4a4-c865-4743-a890-55aba09296bc>
http://en.m.wikibooks.org/wiki/Template:TL
response
<urn:uuid:784f3425-cefe-474e-83e0-fa1ddc7efbae>
robots: classic
hostname: ip-10-234-18-248.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2014-41
operator: CommonCrawl Admin
description: Wide crawl of the web with URLs provided by Blekko for September 2014
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf