Template:TileLink: Difference between revisions

From DDraceNetwork
Added tile link Template.
 
Make Link text optional
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):
Line 15: Line 19:
** 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>
</noinclude><includeonly>[[{{{2}}}|{{{1}}}]] [[{{{2}}}|{{#if:{{{3|}}}|{{{3}}}|{{{2}}}}}]]</includeonly>

Revision as of 21:57, 5 March 2022

‎ 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")