RE: Need some MediaWiki help - evaluation in a template
03-13-2021, 06:52 PM (This post was last modified: 03-13-2021, 06:55 PM by Labster.)
03-13-2021, 06:52 PM (This post was last modified: 03-13-2021, 06:55 PM by Labster.)
Huh, let's see. Elsif is really just syntatic sugar for another if/else block, so that's easy enough.
Something like this maybe? But you'd need to get support for pos from the admins I think:
Code:
{{{image|
{{#if: {{#pos:{{{image}}}|unavailable}}
|<bgcolor=#CCC>[[File:{{{image}}}]]
|[[File:{{{image}}}}]]
}}
|[[Category:Page Needing Image]]}}}
Something like this maybe? But you'd need to get support for pos from the admins I think:
Quote:All of these functions (len, pos, rpos, sub, replace, explode) are integrated from the StringFunctions extension, but are only available if an administrator sets $wgPFEnableStringFunctions = true; in LocalSettings.php.
"Kitto daijoubu da yo." - Sakura Kinomoto