Hello everyone,

Im using templates, which receives 4 parameters: "p1", "p2", "p3" and "p4".

I need to put some text only if "p2" and "p4" exists.

I've already tried this

{{#if: {{{p1|}}} or {{{p2|}}} | MY_TEXT }}

but it doesn't work. I seems that this kind of condition on a template
argument only works when asking by only one argument, but im not entirely
sure.

I tried ask for the differente arguments in differents "#if:" and it works,
but I really don't like it. Something like this:

{{#if: {{{p1|}}} |

{{#if: {{{p2|}}} | MY_TEXT  }}

}}

Is there some better way to do it?

I've been searching the documentation, but couldn't find anything.

Any help would be appreciated.

Thanks in advance,

Marcelo.
_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to