Template:Link: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
Created page with "<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. <pre><nowiki>{{Link|type=faction|id=human}}</nowiki></pre> {{Link|type=faction|id=human}} <pre><nowiki>{{Link|type=faction|id=human|lang=pl}}</nowiki></..." |
No edit summary |
||
| Line 14: | Line 14: | ||
tables = Translation=T_en, Translation=T_disp | tables = Translation=T_en, Translation=T_disp | ||
|join on = T_en.target_id = T_disp.target_id | |join on = T_en.target_id = T_disp.target_id | ||
|where = T_en.target_id = '{{{id}}}' | |where = (T_en.target_id = '{{{id}}}' OR T_en.subtype = '{{{id}}}') | ||
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}}}' | ||
Revision as of 03:05, 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.
{{Link|type=faction|id=human}}
Temple
{{Link|type=faction|id=human|lang=pl}}
Świątynia


