Template:Main/doc: Difference between revisions
Template page
More actions
mNo edit summary |
mNo edit summary |
||
| Line 4: | Line 4: | ||
== Usage == | == Usage == | ||
To link to a main article on a topic like [[Example]], use | To link to a main article on a topic like [[Example]], use | ||
: <code>{{tlx|TNT| | : <code>{{tlx|TNT|Main|Example}}</code> | ||
which renders as | which renders as | ||
{{TNT| | {{TNT|Main|Example}} | ||
You can add up to 5 article names in parameters: | You can add up to 5 article names in parameters: | ||
: <code>{{tlx|TNT| | : <code>{{tlx|TNT|Main|Example|Example|Example|Example|Example}}</code> | ||
which renders as | which renders as | ||
{{TNT| | {{TNT|Main|Example|Example|Example|Example|Example}} | ||
These parameters are used to generate links and may include namespace prefixes or interwiki prefixes. If you want to hide these prefixes (for example here for a link to English Wikipedia) and display an alternative text you can use | These parameters are used to generate links and may include namespace prefixes or interwiki prefixes. If you want to hide these prefixes (for example here for a link to English Wikipedia) and display an alternative text you can use | ||
: <code>{{tlx|TNT| | : <code>{{tlx|TNT|Main|<nowiki>w:en:Example{{!}}Example (in English Wikipedia)</nowiki>}}</code> | ||
which renders as | which renders as | ||
{{TNT| | {{TNT|Main|w:en:Example{{!}}Example (in English Wikipedia)}} | ||
== Internationalisation == | == Internationalisation == | ||
Many articles on Meta should be translatable, in that case use | Many articles on Meta should be translatable, in that case use | ||
: <code>{{tlx|TNT| | : <code>{{tlx|TNT|Main|<nowiki>Special:MyLanguage/Example{{!}}<translate>Example</translate></nowiki>}}</code> | ||
which renders as | which renders as | ||
{{TNT| | {{TNT|Main|Special:MyLanguage/Example{{!}}<translate><!--T:1--> | ||
Example</translate>}} | Example</translate>}} | ||
Revision as of 23:54, 26 December 2013
Usage
To link to a main article on a topic like Example, use
{{TNT|Main|Example}}
which renders as Template:TNT
You can add up to 5 article names in parameters:
{{TNT|Main|Example|Example|Example|Example|Example}}
which renders as Template:TNT
These parameters are used to generate links and may include namespace prefixes or interwiki prefixes. If you want to hide these prefixes (for example here for a link to English Wikipedia) and display an alternative text you can use
{{TNT|Main|w:en:Example{{!}}Example (in English Wikipedia)}}
which renders as Template:TNT
Internationalisation
Many articles on Meta should be translatable, in that case use
{{TNT|Main|Special:MyLanguage/Example{{!}}<translate>Example</translate>}}
which renders as Template:TNT
See also
- {{Further}}
- {{TNT}} (shortcut for {{Translatable template}})
- {{Ll}} (shortcut for {{Localized link}})