문제

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 ?

도움이 되었습니까?

해결책

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.

다른 팁

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.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top