https://bugzilla.wikimedia.org/show_bug.cgi?id=44936

--- Comment #2 from Danny B. <[email protected]> ---
(In reply to comment #1)
> Looking at:
> {{#tag:ref|general|{{#if:{{{group|}}}|group=g3}}}}
> 
> I'm pretty sure this parses something like this:
> 
>  #tag:ref
>    unnamed param 1: resolves to "general"
>    unnamed param 2: resolves to "group=g3"
> 
> while I'm assuming what you want is something like this:
> 
>  #tag:ref
>    unnamed param 1: resolves to "general"
>    named param "group": resolves to "g3" (if 'group' param is present)
> 
> To get that I'm pretty sure you need the literal "blahblah=" in there,
> something like:
> 
> {{#tag:ref|general|group={{#if:{{{group|}}}|g3}}
> 
> This of course will always add a "group" parameter, but sometimes it will be
> blank. This may or may not do what you want, naturally.

I actually originally used |group={{{group|}}} construction, but it had issues
because then it behaved like named group, so instead of <references /> you had
to put <references group="" /> which is obviously uncomfortable.

There might be other tags, where empty param value is valid construction and is
not ignored, so the solution you propose is unfortunately not applicable to
these situations.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to