Template:Error/doc

From London Hackspace Wiki
< Template:Error
Revision as of 02:36, 11 June 2009 by 211.3.247.181 (talk) (+ja)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Mbox

Create a parser function error message.

Usage

  • {{error|An examplary error}} → {{#invoke:Error|error|An examplary error|tag=}}
  • Compare: {{#expr:Invalid}} → Expression error: Unrecognised word "foo".
  • {{#iferror:{{error|Foo}} | {{y}} | {{n}} }} → Template:N

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 genereated e.g. by #expre.

  • {{error|An examplary error span|tag=span}} → {{#invoke:Error|error|An examplary error div|tag=span}}

See also