Template:Error/doc: Difference between revisions
Template page
More actions
m interwiki |
|||
| Line 25: | Line 25: | ||
[[ar:قالب:Error]] | [[ar:قالب:Error]] | ||
[[cs:Šablona:Chyba]] | [[cs:Šablona:Chyba]] | ||
[[de:Vorlage:Vorlagenfehler]] | |||
[[eo:Ŝablono:Eraro]] | [[eo:Ŝablono:Eraro]] | ||
[[es:Plantilla:Error]] | [[es:Plantilla:Error]] | ||
Revision as of 07:32, 6 July 2010
Create a parser function error message.
Usage
- {{error|An exemplary error}} → An exemplary error
- Compare:
{{#expr:Foo}}→ Expression error: Unrecognized word "foo". {{#iferror:{{error|Foo}} | {{y}} | {{n}} }}→ Template:Y
The tag to contain the error message can be given through the tag parameter, but it will only accept span, div, p, and strong, since those are the only tags recognized by the #iferror parser function. It defaults to strong, the tag generated e.g. by #expre.
- {{error|An exemplary error span|tag=span}} → An exemplary error span
- {{error|An exemplary error div|tag=div}} → An exemplary error div
- {{error|An exemplary error p|tag=p}} →
An exemplary error p
- {{error|An exemplary error strong|tag=strong}} → An exemplary error strong
See also