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

From A Wiki in the Desert
Revision as of 21:11, 2 August 2018 by Brad (talk | contribs) (Created the FormattingError helper template that is used by some of my other templates)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Formatting error!

Template documentation (for the above template, sometimes hidden or invisible)

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