ထႅမ်းပလဵတ်ႉ:TG
This page is part of Wikibooks Trainz Wikibook Administration. |
- Purpose
- This template links to a section title or anchor of the Trainz/Glossary page, which is arranged alphabetically into sub-sections organized by spans of titles beginning with the letter ranges (e.g. Aa—Bz); similar to the headings of references like encyclopedias, phone books or a paper dictionary.
Intro
မႄးထတ်းThe template is used as a convenient link-creating (term explaining) to keep the page count down. This aids in the composition of concise text without the bother of slowing down to ensure the reader understands the terminology or base meaning of a colloquial or special term.
- Any brief-to-describe Trainz Terminology or a few paragraphs (see Camera for an example) can thus be linked without disturbing the main flow of the current page's text, yet provide that term explanation globally within the work (Wikibook).
- The similar template {{TN}} links to the special glossary Notations with the exact same syntax described below.
Link formation notes
မႄးထတ်း- Some direct to topic or section linking is possible using titles that are present, or where an {{anchor}} template has been installed with that text string. {{Anchor}} creates an invisible section title in a page, which wikimarkup language knows how to dereference. When such a reference is accessed, template will then form a proper link and 'pretty display' to such values when given them as the first ထႅမ်းပလဵတ်ႉ:TN,
Arg1
or when dereferenced inside a template,{{{1}}} or {{{1|}}}
.
- Some direct to topic or section linking is possible using titles that are present, or where an {{anchor}} template has been installed with that text string. {{Anchor}} creates an invisible section title in a page, which wikimarkup language knows how to dereference. When such a reference is accessed, template will then form a proper link and 'pretty display' to such values when given them as the first ထႅမ်းပလဵတ်ႉ:TN,
- The general format of a template call is (whitespace added for clarity)
{{TG | Arg1 | Arg2 }},
where Arg1 is usually just a letter and Arg2 the term. The term will then be presented as a hyperlink to the section of the Glossary indexed by the letter.
If a term has a direct link created by an anchor above it's text then
{{TG|Arg1}},
will connect to that term, instead of an alphabetized section (because you told it too). If such a link fails, the hyperlink click action formed by the template will put the user into the top of the page.- This is to be avoided, so check your link when proofing the page.
- Usage
- NORMAL CASE: Give two arguments to the template as parameters such as
or{{TG|C|cdp file}}
.{{TG|c|cdp file}}
- The link will display as cdp file and link to an {{anchor}} 'C' which is a hidden page section title.
- For ease of application, the Glossary is sub-divided into sections by ranges of letters as noted above.
- The template in this mode will place the reader clicking the link at the body of the section just at the location after the {{anchor}} text position.
- If a section gets too long for the reader to navigate easily to a topic lower down, the Glossary may be further sub-divided and the anchors adjusted, including use of multiple letter combinations (CM, CMP, DCC, etc.).
- Particularly oft-linked terms can be given a specific anchor as follows:
- Alternative case-1: Give two arguments to the template as pass parameters such as
and the template will form the link{{TG|cdp_file|cdp file}}
[[Trainz/Glossary#cdp_file|cdp file]]
but display as just cdp file.- This works fully only if the section referencing '#cdp_file' is a section title or the hidden section titles defined by including an
{{anchor|cdp file}}
in 'Glossary'. - Notice the EXPLICIT use of an underscore to connect two words in the term to eliminate whitespace characters.
Section linking, including to anchors cannot be made by wikimarkup if the linked section name has whitespaces.
- This works fully only if the section referencing '#cdp_file' is a section title or the hidden section titles defined by including an
- Alternative case-1: Give two arguments to the template as pass parameters such as
- RARER CASE: If a single word without any whitespaces is a section title of the glossary, it may be used by itself.
- Actual code is
[[Trainz/Glossary#{{{1}}}|{{{2|{{{1}}}}}}]]
- Note
- In the resulting concatenation shown below, the second {{{1}}} parameter is the default display string.
[[Trainz/Glossary#{{{1}}}|{{{1}}}]]