Template:Link/clean: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
Created page with "<includeonly><!-- -->{{#if:{{{1|}}}<!-- -->|<!-- Perform consecutive replacements: -->{{#replace:<!-- -->{{#replace:<!-- -->{{#replace:{{{1}}}|Basic |}}<!-- -->|Advanced |}}<!-- -->|Expert |}}<!-- This is the language suffix: -->{{#ifeq:{{{2|en}}}|en||/{{{2}}}}}<!-- -->|<!-- -->}}<!-- --></includeonly><!-- #################################################################### --><noinclude> Re..." |
No edit summary |
||
| Line 4: | Line 4: | ||
-->{{#replace:<!-- | -->{{#replace:<!-- | ||
-->{{#replace:<!-- | -->{{#replace:<!-- | ||
-->{{#replace:{{{1}}}|Basic |}}<!-- | -->{{#replace:<!-- | ||
-->| | -->{{#replace:{{{1}}}|Basic |}}<!-- | ||
-->| | -->|Advanced |}}<!-- | ||
-->|Expert |}}<!-- | |||
-->|Masterful |}}<!-- | |||
This is the language suffix: | This is the language suffix: | ||
-->{{#ifeq:{{{2|en}}}|en||/{{{2}}}}}<!-- | -->{{#ifeq:{{{2|en}}}|en||/{{{2}}}}}<!-- | ||
Latest revision as of 19:17, 25 August 2026
Removes the words Basic, Advanced and Expert from a text so it points to the "family" page. After that, it localizes the link.
1. Normal text
Input: {{Link/clean|Lorem Ipsum}}
Output: Lorem Ipsum
2. Cleaned text
Input: {{Link/clean|Expert Foo}}
Output: Foo
3. With language code
Input: {{Link/clean|Expert Foo|ja}}
Output: Foo/ja
4. Empty text
Input: {{Link/clean}}
Output:


