Template:TRC
This page is part of Wikibooks Trainz Wikibook Administration. • It lists a template which may be useful editing Trainz. Trainz specific (special purpose) templates will be found in or under Category:Trainz Templates, which also lists/links to this Help page. |
- purpose
Makes a simple linking typing-aid template replicating the most needed case of {{TR}} for Containers — that which auto-provides literal specification of the word string '_container' after a characteristic name keyword creating '{{{1}}}_container'
AND which allows building of a section link on the target page.
If there is a single parameter given, TRC will append container to the output string, hence allows links to be displayed with both words, name and container. NOTE: ON 2015-0125, the normal operation of this template was reversed. It now provides the _container string automatically--the opposite way the template did beforehand.
- Any broken links will likely be fixed by deleting such a following word.
- Accordingly, the following usage is suspect, and likely exactly wrong!
- usage
This template in the 'default mode' forms an LITERAL internal link to a 'logical' sub-page of the Trainz Wikibook references division Trainz/containers with placeholder pass parameter {{{1}}}
giving such links as [[ Trainz/containers/{{{1}}} | {{{p|{{{s|{{{2|{{{1}}}}}}}}}}}} ]]
—thus use of the template implicitly assumes the suffix container is appended and is desired to be displayed since all container article titles end with 'container' as the last word...
- Further, the link will only be made if the sub-page name is explicitly correct and full—meaning most times the parameter must be in fact a phrase which contains the end word 'container' preceded by a space. Contrast this default with the alternative default link and display behavior of
{{TR|C|somename}}
discussed below. - The |s=section parameter may also be defined to form a section title link, in which case,
{{{1}}}
must needs have an underscore in place of any and all space characters before the end of 'container' to properly form a link:[[ Trainz/containers/{{{1}}}#{{{s}}} | {{{p|{{{s}}}}}} ]]
. - As is standard with Trainz link templates, defining the named 'Pretty-Print' parameter
| p= something displays the link as {{{p}}}
will overide any other pass terms.
- This processing might be considered a work around doing the opposite link formation of {{TR}}'s default behavior which given the characteristic name, will automatically add 'container' and display the compound of such phrase building. Thus TR makes any link with the word 'container' and display only
{{{1}}}
or{{{2}}}
if given as{{TR|C|name|{{{2}}}}}
.
- Example Trainz/containers/mesh-table container can be formed
{{TR|C|mesh-table}}
,
- In contrast,
{{TRC|mesh-table}}
,{{TRC|mesh-table container}}
... which will also form a correct link but display differently; notice the space in the preceding' container'
.
- It differs from the very similar call
{{TR|C|{{{2}}}}}
in that while{{TR|C|name}}
does append ' container'
for forming the link, it does not and cannot also display the word 'container' in the internal hyperlink.
- To do that, TR must be given a definition for the pipetrick parameter:
( 'p' )
, cluttering up the editable text which is already technical enough.
- To do that, TR must be given a definition for the pipetrick parameter:
- It differs from the very similar call
{{TR|CD|{{{2}}}}}
e.g. mesh-table container
- Use this template instead of TR when you DO NOT want the word container to appear inline.
- IN ALL Cases, including the below (p=pretty-name) forms a over-riding 'pretty name' for display of the desired link-to-page of the 'Trainz references volume' of the Trainz Wikibook projects.
- Since neither TR nor TRC's above mentioned mode handle 'input=full titles' cases like 'Mesh-table container'...
- An alternative calling form of the template operates much like the {{TR}} template with the keywords |C|c|Con|CON|D|d|DIR|dir|DIRECT|direct|Direct= forming legal value links as:
[[Trainz/containers/{{{2}}}|{{{2}}}]]
.
- This mode converts N3V Wiki container links in
[[ ... ]] pairs
to Wikibook compatible links, less the deletion of quotations needed for many TrainzOnline container titles.
- This mode converts N3V Wiki container links in