Template:TileLink: Difference between revisions
Added tile link Template. |
No edit summary |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | |||
This template is for the links on the [[Main Page|main page]] to reduce the repetition and ease translation. It is meant to be used in combination with the [[Template:Tile|tile template]]. | This template is for the links on the [[Main Page|main page]] to reduce the repetition and ease translation. It is meant to be used in combination with the [[Template:Tile|tile template]]. | ||
Line 8: | Line 8: | ||
** Shows the text "Death" | ** Shows the text "Death" | ||
** Both the image and the text link to the [[Jump]] article | ** Both the image and the text link to the [[Jump]] article | ||
The display text is optional, when not provided, the Article title is used: | |||
* <code><nowiki>{{TileLink|{{Tile|entities|3}}|Jump}}</nowiki></code> results in {{TileLink|{{Tile|entities|3}}|Jump}} | |||
This could be translated to another language (for this example to german): | This could be translated to another language (for this example to german): | ||
* <code><nowiki>{{TileLink|{{Tile|entities|3}}|Jump/de|Tod}}</nowiki></code> results in {{TileLink|{{Tile|entities|3}}|Jump | * <code><nowiki>{{TileLink|{{Tile|entities|3}}|Jump/de|Tod}}</nowiki></code> results in {{TileLink|{{Tile|entities|3}}|Jump|Tod}}: | ||
** The link is changed to link to the German version of Jump (<code>Jump</code> -> <code>Jump/de</code> | ** The link is changed to link to the German version of Jump (<code>Jump</code> -> <code>Jump/de</code> | ||
** The displayed text is changed to the translated version of "Death" ("Tod") | ** The displayed text is changed to the translated version of "Death" ("Tod") | ||
</noinclude><includeonly>[[{{{2}}}|{{{1}}}]] [[{{{2}}}|{{{3}}}]]</includeonly> | [[Category:Templates]] | ||
</noinclude><includeonly>[[Special:MyLanguage/{{{2}}}|{{{1}}}]] [[Special:MyLanguage/{{{2}}}|{{#if:{{{3|}}}|{{{3}}}|{{{2}}}}}]]</includeonly><noinclude> | |||
<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"aliases": [ | |||
"Tile" | |||
], | |||
"label": "The tile template.", | |||
"description": "The tile template.", | |||
"example": "{{Tile|entities|3}}", | |||
"type": "wiki-template-name", | |||
"required": true | |||
}, | |||
"2": { | |||
"aliases": [ | |||
"Page" | |||
], | |||
"label": "The article intralink.", | |||
"description": "The article intralink.", | |||
"example": "Jump", | |||
"type": "wiki-page-name", | |||
"required": true | |||
}, | |||
"3": { | |||
"aliases": [ | |||
"text" | |||
], | |||
"label": "The text to show.", | |||
"description": "The text to show.", | |||
"example": "Jump", | |||
"type": "string", | |||
"required": true | |||
} | |||
}, | |||
"description": "A link to a tile.", | |||
"paramOrder": [ | |||
"1", | |||
"2", | |||
"3" | |||
], | |||
"format": "inline" | |||
} | |||
</templatedata></noinclude> |
Latest revision as of 09:20, 11 February 2023
This template is for the links on the main page to reduce the repetition and ease translation. It is meant to be used in combination with the tile template.
Usage
{{TileLink|{{Tile|entities|3}}|Jump|Death}}
results in Death:- Shows the unhookable tile from the entities layer (for the usage see Template:Tile
- Shows the text "Death"
- Both the image and the text link to the Jump article
The display text is optional, when not provided, the Article title is used:
{{TileLink|{{Tile|entities|3}}|Jump}}
results in Jump
This could be translated to another language (for this example to german):
{{TileLink|{{Tile|entities|3}}|Jump/de|Tod}}
results in Tod:- The link is changed to link to the German version of Jump (
Jump
->Jump/de
- The displayed text is changed to the translated version of "Death" ("Tod")
- The link is changed to link to the German version of Jump (
A link to a tile.
Parameter | Description | Type | Status | |
---|---|---|---|---|
The tile template. | 1 Tile | The tile template.
| Template | required |
The article intralink. | 2 Page | The article intralink.
| Page name | required |
The text to show. | 3 text | The text to show.
| String | required |