Difference between revisions of "Template:Formatting error"

From Freeside Atlanta
Jump to: navigation, search
m (Changed protection level of Template:Formatting error: Highly-visible template (between 700 and 1200 transclusions) (‎[edit=autoconfirmed] (indefinite) ‎[move=sysop] (indefinite)))
m (1 revision)

Latest revision as of 18:30, 16 February 2013

<span id="FormattingError" />Error in template

[view] [edit] [history] [purge] 50px Template documentation

Outputs an error message in red into the page and adds the page to Category:Pages with incorrect formatting templates use. An anchor (FormattingError) is inserted at the start of the error message, so you can find any errors on a page easily by adding #FormattingError at the end of the URL (e.g. Template:val/test#FormattingError). Used in complex templates that check their arguments for validity, so incorrect use can be spotted while editing a page or afterwards.

[edit] Usage

  • {{FormattingError|error message}}


  • {{FormattingError|error message|nocategory=true}}

When using the nocategory argument, the error message is displayed as usual, but the page is not added to Category:Pages with incorrect formatting templates use. This is useful in documentation pages for templates that use FormattingError and show what errors they can generate without adding these documentation pages to the category. For an example of this, see {{LinkForElement}}.

This template can be evaluated using the {{#iferror}} parser function:

  • {{#iferror:{{val|XX}}|error|OK}}error

[edit] See also

ar:قالب:FormattingError bn:টেমপ্লেট:Formatting error es:Plantilla:FormattingError id:Templat:FormattingError ja:Template:FormattingError ru:Шаблон:FormattingError sl:Predloga:FormattingError

Personal tools

About Us
Support Us
Activities and Culture