Question

I have infobox templte like:

{{Infobox
  |image         = {{{image|}}}
}}

and i want that template show image even if user type blablabla instead of image.what should i do ?

Était-ce utile?

La solution

You can have “aliases“ for parameter names like this: {{{image|{{{picture|{{{file|}}}}}}}}}. This will work for image = ..., picture = ..., and file = ....

It's not possible to get the value of any parameter name, though.

Autres conseils

If the user mistypes the parameter name, you cannot catch that [in the template alone][with standard template functions].

If you want the user to freely choose a parameter name, you can do that but he needs to tell you the parameter name. Example:

The {{{1}}} is {{{{{{1}}}}}}.

{{MyTemplate|parameter|parameter=variably named}}
->
The parameter is variably named.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top