• In my wikia, I have a template called {{Nota|1}}. This template shows a little information "i" that when you hover it, it shows an advanced tooltip with the text inserted on {{{1}}}.

    What I want to do is that when {{{1}}} has only a "?" it only shows a bold and <sup> question mark but when it has a string other than a "?", I want it to show a tooltip with that string.

    I want this because I think it's weird to just show a "?" when you hover the "i".

      Loading editor
    • Solution found by Discord user River | Esports:

      {{#ifeq:{{{1|}}}|?|case when ?|default case}}

        Loading editor
    • You can use the #ifeq: parser function to check if a value equals "?":

      {{#ifeq:{{{1}}}|?|<sup>'''?'''</sup>|your tooltip goes here}}
        Loading editor
    • Or...

      {{#ifeq:{{{1|}}}|?|<sup>'''?'''</sup>|<span title="your tooltip goes here">{{{1|}}}</span>}}

      The previous code doesn't show a tooltip with {{{1}}} contents if not passed '?', just some string if |1=some_string.

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message
Community content is available under CC-BY-SA unless otherwise noted.