“Template:Weather inline”的版本间的差异
跳到导航
跳到搜索
小 (+synonym) |
小 (sync with english template) |
||
第26行: | 第26行: | ||
-->{{#arraydefine:$wlink_text|{{ParseInputValues|code=weather|@weather@|translate=true}}}}<!-- | -->{{#arraydefine:$wlink_text|{{ParseInputValues|code=weather|@weather@|translate=true}}}}<!-- | ||
− | // | + | // Wrap a sort-key span around all items if requested. On other entries, add {{{space}}} or bullet. |
-->{{#ifexpr:{{#arraysearch:$wweather|@weather@}}>0 | -->{{#ifexpr:{{#arraysearch:$wweather|@weather@}}>0 | ||
− | | •  | + | |{{{space| • }}} |
− | |{{#if:{{{sortkey|}}}| | + | |{{#ifexpr:{{#if:{{{sortkey|}}}|1|0}} or {{#ifeq:{{{sortkey}}}||1|0}} |
− | <span | + | |<span data-sort-value="{{#ifeq:{{{sortkey}}}|||{{#ifeq:{{{sortkey|true}}}|true |
− | + | |{{#expr:{{#if:{{#arrayprint:$wlink_text}} | |
− | + | |({{ParseInputValues|code=weather|@weather@|translate=index}}+1) | |
+ | |0}}}} | ||
+ | |{{{sortkey|}}}}}}}"> | ||
}}}}<span style="display:inline; margin-right:0; white-space: nowrap"><!-- | }}}}<span style="display:inline; margin-right:0; white-space: nowrap"><!-- | ||
第49行: | 第51行: | ||
// Add link | // Add link | ||
-->[[{{#arrayprint:$lang_weatherlink}}|{{#arrayprint:$wlink_text}}]]<!-- | -->[[{{#arrayprint:$lang_weatherlink}}|{{#arrayprint:$wlink_text}}]]<!-- | ||
− | -->}}}}</span>}}}}</includeonly><noinclude>{{Englishdoc}}{{#ifexist:{{FULLPAGENAME}}/doc |<nowiki/> | + | -->}}}}</span>}}<!-- |
+ | -->{{#ifexpr:{{#if:{{{sortkey|}}}|1|0}} or {{#ifeq:{{{sortkey}}}||1|0}}|</span>}} | ||
+ | }}</includeonly><noinclude>{{Englishdoc}}{{#ifexist:{{FULLPAGENAME}}/doc |<nowiki/> | ||
{{{{FULLPAGENAME}}/doc}} }}</noinclude> | {{{{FULLPAGENAME}}/doc}} }}</noinclude> |
2020年10月31日 (六) 03:40的版本
有关此模板的详细信息,请参阅英语语言文档页。
用法
可以通过在相关页面上输入以下内容来使用此模板。
{{Weather inline}}
结果是... Template:ParseInputValues[[File:Template:ParseInputValues.png|
| link=天气| alt=]] [[天气|Template:ParseInputValues]]