The Wiki for Tale 8 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.

If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.

Template:FormattingError/doc

From A Wiki in the Desert
< Template:FormattingError
Revision as of 21:12, 2 August 2018 by Brad (talk | contribs) (Created page with "'''{{tl|FormattingError}}''' is a utility template designed to be called from other templates. == Example == <pre> {{#ifeq:{{NAMESPACE}}|{{ns:...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

{{FormattingError}} is a utility template designed to be called from other templates.

Example

{{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{FormattingError|Template:xt is only for examples of style and formatting. Do not use it in actual articles.}}

The above code, which is used in the {{xt}} template, raises an error if the template is used in the main article namespace. In other words, if the NAMESPACE's unique numeric code equals 0, produce the given error message.

Because {{xt}} is not to be used in article content, this code allows the template to notify an editor who attempts to do so, instead of displaying the template's contents. This isn't the only way this template can be used, but is a good example of an appropriate use.

Usage

The first parameter passed to the template replaces the generic "Formatting error!" message.