Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Error/doc: Difference between revisions

Template page
mNo edit summary
Line 6: Line 6:
=== Usage ===
=== Usage ===
* {{tlx|error|An examplary error}} → {{error|An examplary error}}
* {{tlx|error|An examplary error}} → {{error|An examplary error}}
* Compare: <nowiki>{{#expr:Foo}}</nowiki> → {{#expr:Foo}}
* Compare: <code><nowiki>{{#expr:Foo}}</nowiki></code> → {{#expr:Foo}}
* <nowiki>{{#iferror:{{error|Foo}} | {{y}} | {{n}} }}</nowiki> → {{#iferror:{{error|Foo}} | {{y}} | {{n}} }}
* <code><nowiki>{{#iferror:{{error|Foo}} | {{y}} | {{n}} }}</nowiki></code> → {{#iferror:{{error|Foo}} | {{y}} | {{n}} }}


The tag to contain the error message can be given through the <code>tag</code> parameter, but it will only accept <code>span</code>, <code>div</code>, <code>p</code>, and <code>strong</code>, since those are the only tags recognized by the <code>#iferror</code> parser function. It defaults to <code>strong</code>, the tag genereated e.g. by <code>#expre</code>.
The tag to contain the error message can be given through the <code>tag</code> parameter, but it will only accept <code>span</code>, <code>div</code>, <code>p</code>, and <code>strong</code>, since those are the only tags recognized by the <code>#iferror</code> parser function. It defaults to <code>strong</code>, the tag genereated e.g. by <code>#expre</code>.

Revision as of 06:19, 20 February 2010

Create a parser function error message.

Usage

  • {{error|An examplary error}} → An examplary 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 genereated e.g. by #expre.

  • {{error|An examplary error span|tag=span}} → An examplary error span

See also


Cookies help us deliver our services. By using our services, you agree to our use of cookies.