A Project of the Center for Advanced Study in the Visual Arts, National Gallery of Art
History of Early American Landscape Design

Difference between revisions of "Template:Formatting error/doc"

[http://www.nga.gov/content/ngaweb/research/casva/research-projects.html A Project of the National Gallery of Art, Center for Advanced Study in the Visual Arts ]
(+ja)
 
m (16 revisions)
 
(9 intermediate revisions by one other user not shown)
Line 15: Line 15:
 
* [[:Special:WhatLinksHere/Template:FormattingError|What links here]] for a list of pages that use this template
 
* [[:Special:WhatLinksHere/Template:FormattingError|What links here]] for a list of pages that use this template
 
* [[:Category:Pages with incorrect formatting templates use]] for a list of pages that have been marked as using a formatting template incorrectly using this template.
 
* [[:Category:Pages with incorrect formatting templates use]] for a list of pages that have been marked as using a formatting template incorrectly using this template.
 +
*{{tl|Format}}
  
 
<includeonly>
 
<includeonly>
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[ja:Template:FormattingError]]
+
</includeonly>
 +
 
 +
<includeonly>
 +
[[id:Templat:FormattingError]]
 
</includeonly>
 
</includeonly>

Latest revision as of 19:06, September 4, 2013

{{#invoke:Fallback | autotranslate

      |base = Documentation subpage
      |lang = 
      |page = Template:Formatting error
    }}

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). Used in complex templates that check their arguments for validity, so incorrect use can be spotted while editing a page or afterwards.

Usage

  • {{FormattingError|error message}}

or

  • {{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

See also



Retrieved from "https://heald.nga.gov/mediawiki/index.php?title=Template:Formatting_error/doc&oldid=2456"

History of Early American Landscape Design contributors, "Template:Formatting error/doc," History of Early American Landscape Design, , https://heald.nga.gov/mediawiki/index.php?title=Template:Formatting_error/doc&oldid=2456 (accessed March 28, 2024).

A Project of the Center for Advanced Study in the Visual Arts

National Gallery of Art, Washington