Trainz/Templates



Preface

 * This page is in the Category:Trainz Admin 'where all tools and special guidelines for Trainz will now be found! Questions: Post to: Fra nkB 
 * If you don't know how to do something... Ask! (Skype is frank.a.bartus for ease of speed and clear communications.) I've got 60-70,000 edits on nine WikiMedia projects like this and am a fair template coder.
 * more suited to our Trainz needs and a comprehensive category system is mostly now in place!

The first section of this page contains in-line templates, the second special trainz box templates, most of which make a box with data within.
 * 2014-0918 Wikibooks...
 * List of templates recently worked on (Latest Revision)


 * space tagging templates
 * 1) Template:Trainz-cat
 * 2) Template:TRSCat
 * 3) Template:Tref-pg  ???
 * utility and auto-categorizing mix
 * 1) Template:Trainz-stub
 * 2) Template:TRS-style
 * 3) Template:TRS-SubSubPg
 * 4) Template:TRS-sectstub
 * 5) Template:Trainz-stub
 * 6) Template:FAB-todo
 * 7) Template:R from Trainz
 * 8) Template:Trainz-sect-stub
 * 9) Template:Trainz-admin
 * 10) Template:Trainz-ref-page
 * 11) Template:Trainz-ref
 * 12) Template:Trainz-Admin
 * 13) Template:Trainz-page - (Fabartus moved page Template:Trainz-ref-page to Template:Trainz-page: reusing title for another admin template, this makes both more 'useable' and intuitive') (current) [rollback more than 10 edits]
 * 14) Template:Tre

Page header and footer templates
Template:TRScc-top + Template:TRScc-bot - This is the workhorse for Advanced material, use AM&C templates for intermediate materials pages. HowTo use Blender or Gmax basics belong in AM&C, other more refined instructionals in the CC pages. />
 * Pages may be located in Trainz\pagename, if it is expected to be a much linked and much linked topic, but preferentially, that format should be for redirects to a page group (Book Division) where the page is listed in that TOC page.
 * Tutorials on CC and skills building tutorials should be in Content Creation and Introductory Trainz respectively.
 * Note this list mostly matches templates in use on the TrainzOnline pages: The 'FUN' one's marked depreciated aren't used here
 * 1) Template:AM&C-top + Template:AM&C-bot - This is the workhorse for intermediate materials pages, such as Error Fixing, Windows application's HowTo, general theory and background (e.g. containers) and other introductory to intermediate knowledge topics.
 * 2) Template:FUN-top + Template:FUN-bot - This is the workhorse for introductory material, use AM&C templates for intermediate materials pages, and CC pages templates for advanced tutorials on Content Creation.
 * 3) Template:FUN-beg +  Template:FUN-end - both depreciated
 * 4) Template:ORP-top + Template:ORP-bot - This is the workhorse for TrainzOnline enhanced materials and examples pages. Asset modification pages should be in AM&C or CC divisions; all pages in the references TOC should be technical references, not HowTo pages.
 * 5) The template pair is also used to tag Appendix pages, appropriate switches being passed.
 * 1) last there is: Template:TRS-page - depreciated; but one way to thread pages, Prev= '1', Next= '2', Thread Start (center link)= '3'(Main page is default, '4' =Main TOC, default is Trainz, or  , the Wikibook division TOC. The latter two can instead be used to fork navigation<br

Internal Link Templates
The two biggest time savers in this group link to the and  pages.
 * 1) Template:TL
 * 2) Template:TA
 * 3) Template:Col
 * 4) Template:TR
 * 5) Template:Kp
 * 6) Template:TG
 * 7) Template:TOL
 * 8) Template:Center
 * 9) Template:N3V
 * 10) Template:Larger
 * 11) Template:Wp

Editorial Aid Templates
These templates are used in-line to create links and display effects. They use mnemonic names, a standardized syntax necessary to simplify evaluation of the message on a page, on the one hand (Very short names and short, but consistent command parameter names or orders)  and obviate the need for hiding subpage paths or displaying full paths for such pages on the other.
 * Aka, typing-aid templates
 * They also support sub-subpages, and a uniform pipetrick ability if an pretty-text override is in order to satisfy prose composition.
 * These features have been built-in to the several external link templates as much as possible as well
 * but Unicode and underscores in navigation must usually require a direct pretty-print override where the url has Unicode characters.
 * Several external link templates use syntax that allows directly linking to TrainzOnline Wiki pages, while a more general template allows pretty links to other (3rd party tutorials, for example) websites.

Simple internal links
 External Linking templates that include whitespace in the link forming parameter (the first part separated by '|' characters after the template name itself need to have UNDERSCORE characters instead of spaces.
 * general rule
 * Make sure to test such links, especially external links before thinking your job is done. 
 * If you external link to another wiki such as Wikipedia or TrainzOnline, and the link uses a redirected page name, formulate the call to the proper full article name so it doesn't get disconnected if the redirected page title gets changed.
 * The exception to this is the N3V Wiki pages using double-quotes in their titles. In such a case, use the page title without the quotes, and if necessary, create a redirect page on that wiki.


 * N3V &mdash; the workhorse of external linking to the N3V Wiki.
 * 1st argument is the page after ' url '


 * will appear as
 * and symbolically link externally as longform: 🇨🇴 so is the same as the longer wikimarkup external link:
 * and literally form the link.
 * and literally form the link.


 * Internal simple links
 *  will appear as Content Manager 
 * and symbolically link to a subpage as longform:
 * and literally form the link  forming a link to a direct sub-page of the Trainz Main Page.

Similarly, TA forms a link to a sub-page off Trainz/AM&C AND TC forms a link to a sub-page off Trainz/Content Creation. But TR (references) and TG (glossary link) use an intermediate argument/pass parameter to modify the parsing.

Not-so simple links
In organizing to group pages, simple linking templates were contraindicated once pages needed several sub-page levels and breaking the project into volumes only eliminated at most one such level. This spawned a new breed of template, which has some 'filtering smarts' or complimnetary coding to generate the desired links.
 * (links to major section title in the Trainz Glossary) will appear as
 * and symbolically link as longform:
 * so is the same as the longer: Content Manager Plus

The next lines Are obsolescent...
 * will appear and link as
 * and symbolically link to a subpage as longform:
 * so is the same as the longer:    
 * void hidden text follows
 * so not current planning, error fixing will be in Trainz AM&C volume. Error fixing will likely be Trainz AM&C/Trainz_Error_Fixing.


 * will appear as ... other text hidden pending reworking schema
 * void ends
 * (Trainz Windows Application skills section title) will appear as
 * and symbolically link to a 🇨🇴 section of the reference page Trainz references/Windows_skills as longform:
 * will appear as and symbolically link as longform:
 * to a Wikipedia article.

plain link


'Plain link' forms a full external link for use in-line with a 'pretty print' text replacement.

An example: The Trainz asset technology level is found in each assets' config.txt file and is  or sometimes the 'version number' which is strongly related to but different (it's directly dependent&mdash;since trainz-build tag value is defined by the code build of when the asset is created. Both your actual software installed version (see titlebar of Post TS09-SP0 for this  version number) and the asset's trainz-build are usually different) from the '', which identifies the specific mix of software modules uniquely, also called the 'software build number' that is listed on each launcher screen.

Editing, temp section
 LINKS CONTAINING THESE WILL NOT FORM A PROPER LINK as ASCII  characters in Wikimedia software parsing. The field breaks when one is encountered. Hoover your mouse tooltip over and compare:
 * Proper full link: script-include-table_container
 * and is the literal:

(Full manual essence plain link would form)
 * Hoover and Compare: which fails to form when Plain link is given literally:


 * While plain link with the escaped UNICODES returns: showing four extra ASCII bytes makes a big difference.
 * huh
 * but is the literal:
 * A BAD Link with quotes:.
 * Literally:


 * GOOD Link with CODES:
 * Literally:

...
 * Q.E.D., as described, those four extra characters in the link make a difference. Further, this advisory does not just apply to web links containing '"', but to other characters as well used in the international conventions (likely Unicode) of the . It has not been evaluated whether quote leading pagenames herein will even link properly, since this site uses Common.css and Common.js files and processes, whereas the N3V TrainzOnline Wiki does not.

TrainzLinkNeeded

 * 'TrainzLinkNeeded' is meant to be replaced by 'Plain link' when a valid url is found. It can also be inserted as  where the double pipe fills in the url of the message page, as an aid to both writers and readers. The template automatically categorizes pages to the maintenance tracking category Category:Trainz Links Fixups needed.
 * 'TrainzLinkNeeded' is meant to be replaced by 'Plain link' when a valid url is found. It can also be inserted as  where the double pipe fills in the url of the message page, as an aid to both writers and readers. The template automatically categorizes pages to the maintenance tracking category Category:Trainz Links Fixups needed.

TrainzTip

 * This template makes a tip box like this:
 * Example code:


 * need I say more? // Fra nkB


 * The below templates are standard MetaWiki general purpose templates ported into Wikibooks. Fra nkB 17:55, 21 June 2013 (UTC) says I'll likely workup a customized version of some for Trainz so if you want something soon, drop me a note. For now, use the in-page template

Wikibooks Standard Templates
While use of these templates is not discouraged, they assume you will be back later to edit again and continue the work since they do not place pages into a Trainz Maintenance sub-cat.

TODO


Flag pages or sections that need some work with: Use with some caution as it adds a link to the page in the Wikibooks-wide TODO category.

Info


Provide some supplemental information set off with:

Warning


Warn the reader of something they might do wrong with dire consequences with:

Danger


Warn the reader of something they might do that could have catastrophic results with:

Example


Visually set off an example with

Code
Set off sections of code, particularly for scripts. Wikibooks has an extensive set of enhanced templates for code markup with documentation. If the example is short, preface each line with a space to achieve a fast page wide emphasizing presentation
 * like this line.

Incomplete
Flag a page as a work in progress with:

Page to page linking

 * For now...
 * Use the standard Wikibooks template  template so with Previous page= 'Installation Under Microsoft Windows' and next page= 'Installing Service Packs' the template, which goes on the page bottom above the page category and will look like:

and and display both top and bottom (Look here in those two places)

Administration templates

 * Placing on a page top makes it part of the auto-category Category:Trainz Admin and displays the message box notice above. This has more general use than might be summarized here. With this and all templates, familiarize yourself with their usage&mdash;normally a lot of thought goes into writing such usage for lay-editors.


 * Placing will link Trainz pages page to page (threading them like Chapter navigation but not making it's own links, instead...) using the category:Trainz linking templates passed with full pipetricked links. See the glossary page to see how it manifests as a footer and a nav-link above the page title box&mdash;with links in both places.


 * The general header template TRS-hdrbox will take such pass parameters from the Trainz divisions page header templates soon, with an option to link both up and down as well, including off-site.


 * Placing will auto-categorize a page to sub-category Category:Trainz appendixes and (??) Category:Trainz reference pages such pages should also be incorporated into Trainz references TOC lists, the rules about which and TOC decisions are evolving 2014-0902.


 * Placing or  on a page auto-categorizes it to Category:Trainz pages needing attention (stubs) and displays a message box warning readers the page is unfinished. ALL STUB auto-categorizing (maintenance) templates should have a date defined in yyyy-mmdd form, AND can take another parameter suggesting what needs done. (this need not display, some do, some don't, some do either. If they don't, the text you outline as the TO-DO List disappears into the bit bucket &mdash; until someone edits the section, then the list is there to read.


 * Placing in a section displays a similar section stub messagebox and auto-categorizes it to the Sub-category Category:Trainz section stubs. Later this template was aliased by the TRS-sect-stub template.


 * Place TRS-SubSubPg at page bottom when breaking a topic into multiple pages, the parent (sub-)page then should reference the sub-sub-page. In Wikibooks terms, the set parents and children are a Module. This auto-categorizes the page into a comprehensive list category:Trainz Sub-Sub-pages.

Redirect pages templates
as for CM and CMP are formulated
 * Place R from Trainz on redirect pages to other Trainz Division pages, including when moving a page (edit in after the move) to auto-categorize and list Trainz redirected pages or aliases (e.g. CM and CMP both redirect to the Content Manager page, Layout to Route, so useful to use redirects at times.) The template must be placed immediately after the page redirect instruction link and on the same line as in:
 * 1) redirect Trainz/Content Manager
 * Other redirect templates are used similarly, though most are formatted to.

This page is a redirect from a Wikibooks Trainz page which either has been moved, or renamed as part of the Trainz Asset Management and Creation (AM&C) division of the Trainz Wikibook.
 * Template:R to TRS-CC - Pages relocated to category:Trainz Content Creation division pages.
 * Template:R to TRS-ref - Pages relocated to Category:redirects to Trainz reference pages division pages.
 * Similar: R to TRS-sect - for when the redirect is a searchable title, but topic coverage is in the section of a page.
 * Similar: R from Trainz - initial R template, general purpose, adds pages to Trainz redirects as a catchall category.
 * Similar: R from Trainz alternative name - for pages which have been given 'better' (more searchable) names or aliased for easing searching. This takes the 'bad' title from the main category.

Category tagging templates
Suggest not creating a category without consultation, it is likely the group you suggest has already been covered.
 * Place &mdash; use only on categories to demarcate and auto-categorize them as Trainz pages. The category will auto-default to trainz maintenance unless given a value in the control parameter 'noMaint' like:.

Preliminary category tree
See also these Categories:
 * outline of category tree (temp here)
 * temp: whilst working out something started now missing.
 * category:Trainz categories - Organizational the root of the tree, admin/maintenance one branch, articles via : on the other
 * category:All Trainz pages
 * category:All Trainz sub-pages


 * Volume parents
 * category:Trainz intro - category: Introductory Trainz
 * category:Trainz fundamentals pages


 * category:Trainz AM&C - All pages classed as intermediate skills, especially asset management (CM and examples), simple cloning and config editing through reskinning and repairs.
 * category:Trainz content creation - and oops! category:Trainz Content Creation, declared obsolete unless their is a matching Trainz Wiki category. Then the other we'll change the templates to auto-categorize the other way!
 * category:Trainz references
 * category:Trainz reference pages - reluctantly keeping both of these. May utilize the one solely for appendix pages, since matching TOC is going that way. The other for N3V co-coveraged pages... which ever matches their ORP-bot autocategorization.
 * category:Config tags - or under Trainz?


 * Admin pages
 * category:Trainz Admin
 * category:Trainz Sub-Sub-pages -- lists all sub-sub pages regardless of volumes above
 * category:Trainz Sub-subpages - spelling consistency is not my strong suite! These are meant for third level down pages, typically examples pages in the schema, though some technical sub-subpages will find their way in.
 * category:Trainz Templates


 * category:Trainz Maintenance‎
 * category:Trainz section stubs
 * category:Trainz stub pages


 * category:Trainz redirect pages‎
 * category:Trainz Templates Documentation‎
 * category:Trainz pages needing attention