Template:Link: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
This template is meant to handle the linking of articles in a way that is language-agnostic, meaning that it can be used in language-aware infoboxes and other contexts which need to be able to handle multiple languages. This template only works with concepts which have their translation managed by Cargo. | This template is meant to handle the linking of articles in a way that is language-agnostic, meaning that it can be used in language-aware infoboxes and other contexts which need to be able to handle multiple languages. This template only works with concepts which have their translation managed by Cargo. | ||
If '''noarticle''' is provided, it will render with no link. | |||
| Line 6: | Line 8: | ||
{{Link|type=faction|id=human}} | {{Link|type=faction|id=human}} | ||
<pre><nowiki>{{Link|type=ui|id=starting_army}}</nowiki></pre> | |||
{{Link|type=ui|id=starting_army|noarticle}} | |||
<pre><nowiki>{{Link|type=faction|id=human|lang=pl}}</nowiki></pre> | <pre><nowiki>{{Link|type=faction|id=human|lang=pl}}</nowiki></pre> | ||
| Line 17: | Line 23: | ||
AND T_en.type = '{{{type}}}' AND T_en.language = 'en' | AND T_en.type = '{{{type}}}' AND T_en.language = 'en' | ||
AND T_disp.type = '{{{type}}}' AND T_disp.language = '{{{lang|en}}}' | AND T_disp.type = '{{{type}}}' AND T_disp.language = '{{{lang|en}}}' | ||
|fields = T_en.name = article, T_disp.name = text, T_disp.language = lang | |fields = IF(CONCAT('{{{1|}}}') != '', '', T_en.name) = article, T_disp.name = text, T_disp.language = lang | ||
|format = template | |format = template | ||
|template= Link/render | |template= Link/render | ||
Revision as of 04:23, 16 May 2026
This template is meant to handle the linking of articles in a way that is language-agnostic, meaning that it can be used in language-aware infoboxes and other contexts which need to be able to handle multiple languages. This template only works with concepts which have their translation managed by Cargo.
If noarticle is provided, it will render with no link.
{{Link|type=faction|id=human}}
Temple
{{Link|type=ui|id=starting_army}}
Starting Army
{{Link|type=faction|id=human|lang=pl}}
Świątynia


