https://bugzilla.wikimedia.org/show_bug.cgi?id=72920
Bug ID: 72920
Summary: {{!}} always treated as literal instead of separator
when the template is transcluded
Product: MediaWiki
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Unprioritized
Component: Parser
Assignee: [email protected]
Reporter: [email protected]
Web browser: ---
Mobile Platform: ---
It is hard for me to describe this problem, so I made a simple (and useless)
example to describe this problem.
Suppose I do have a template named "Template:A" with the content:
{{void{{<includeonly>safesubst:</includeonly>!}}param=any}}
If I call this template with {{subst:A}} everything works as expected, since
{{!}} is expanded and the generated "|" is treated as a parameter separator, so
"Template:void" is called with "param=any" as parameter. So far so good.
But, if I call this template with {{A}}, the {{!}} is expanded as literal "|"
and the "Template:void|param=any" is called without parameters, which is an
error.
I do not know exactly how to workaround this issue (maybe some trick I do not
know).
As I stated before, this is just a minimal example, because what I really
intend to do is to pass a parameter to another template only when one condition
is satisfied, but I am not able to made it work when the template is both
substituted or transcluded.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l