Vorlage:Season: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Revamp using new helper templates) |
K (unique arrays for each template) |
||
Zeile 13: | Zeile 13: | ||
// Parse input data, then loop over all extracted entries | // Parse input data, then loop over all extracted entries | ||
− | -->{{#arraydefine:$ | + | -->{{#arraydefine:$sseason|{{ParseInputValues|{{{1|}}}|{{#arrayprint:$engl_seasons}}|{{#arrayprint:$lang_seasons}}|default=true}}}}<!-- |
− | -->{{#if:{{#arrayprint:$ | + | -->{{#if:{{#arrayprint:$sseason}} | |
<span style="display:inline; margin-right:0;"><!-- | <span style="display:inline; margin-right:0;"><!-- | ||
− | -->{{#arrayprint:$ | + | -->{{#arrayprint:$sseason||@season@|<!-- |
// Add space if this is not first entry | // Add space if this is not first entry | ||
− | -->{{#ifexpr:{{#arraysearch:$ | + | -->{{#ifexpr:{{#arraysearch:$sseason|@season@}}>0| }}<!-- |
// Convert @season@ (english page name) into translated page name | // Convert @season@ (english page name) into translated page name | ||
− | -->{{#arraydefine:$ | + | -->{{#arraydefine:$slink_text|{{#arrayindex:$lang_seasons|{{#arraysearch:$engl_seasons|@season@}}}}}}<!-- |
// Display the non-icon, non-linkable cases: Devations, and unmatched text (detected by empty link_text) | // Display the non-icon, non-linkable cases: Devations, and unmatched text (detected by empty link_text) | ||
// This is also how text_only option is handled | // This is also how text_only option is handled | ||
− | -->{{#ifeq:{{#arrayprint:$ | + | -->{{#ifeq:{{#arrayprint:$slink_text}}| |
| {{ucfirst:@season@}} | | {{ucfirst:@season@}} | ||
| {{#ifexpr: {{#ifeq:@season@|Deviations|1|0}} or {{#if:{{{text_only|}}}|1|0}} | | {{#ifexpr: {{#ifeq:@season@|Deviations|1|0}} or {{#if:{{{text_only|}}}|1|0}} | ||
− | | {{#if:{{{no_translate|}}}|@season@|{{#arrayprint:$ | + | | {{#if:{{{no_translate|}}}|@season@|{{#arrayprint:$slink_text}}}} |
| <!-- | | <!-- | ||
Zeile 40: | Zeile 40: | ||
|Seasons = All_Seasons_Icon | |Seasons = All_Seasons_Icon | ||
|Marriage = Mermaid's Pendant | |Marriage = Mermaid's Pendant | ||
− | }}.png | {{{width|24px}}} | link={{#arrayprint:$ | + | }}.png | {{{width|24px}}} | link={{#arrayprint:$slink_text}} | alt={{#arrayprint:$slink_text}}]] <!-- |
// Add link, with special treatment for text of All Seasons | // Add link, with special treatment for text of All Seasons | ||
− | -->[[{{#arrayprint:$ | + | -->[[{{#arrayprint:$slink_text}}|<!-- |
-->{{#ifeq:@season@|Seasons | -->{{#ifeq:@season@|Seasons | ||
|{{#if:{{{do_short|}}}|{{#arrayprint:$lang_allshort}}|{{#arrayprint:$lang_alllong}}}} | |{{#if:{{{do_short|}}}|{{#arrayprint:$lang_allshort}}|{{#arrayprint:$lang_alllong}}}} | ||
− | |{{#arrayprint:$ | + | |{{#arrayprint:$slink_text}}}}]]<!-- |
-->}}}}}}</span>}}</includeonly><noinclude>{{Englishdoc}}{{#ifexist:{{FULLPAGENAME}}/doc |<nowiki/> | -->}}}}}}</span>}}</includeonly><noinclude>{{Englishdoc}}{{#ifexist:{{FULLPAGENAME}}/doc |<nowiki/> | ||
{{{{FULLPAGENAME}}/doc}} }}</noinclude> | {{{{FULLPAGENAME}}/doc}} }}</noinclude> |
Version vom 3. September 2020, 07:45 Uhr
Details zur Vorlage finden Sie auf der englischsprachigen Dokumentationsseite.
Verwendung
Diese Vorlage kann verwendet werden, indem Sie auf eine relevante Seite folgendes eingeben.
{{Season}}
Ergibt... Vorlage:ParseInputValues