Template:Explanation

From Glitch City Wiki
Jump to navigation Jump to search

Usage

Wikitext Result
{{Explanation|contents=The result is 2+255=257, which overflows and becomes 1.}}
Explanation

The result is 2+255=257, which overflows and becomes 1.

{{Explanation
|title=Alternative title
|contents=You can use <code>title=</code> to set an alternative title...
}}
Alternative title

You can use title= to set an alternative title...

{{Explanation
|Alternative title
|contents=... or just use an unnamed parameter.
}}
Alternative title

... or just use an unnamed parameter.

For now, the contents cannot be an unnamed parameter, because:

  • Handling the logic of unnamed parameters in wikitext can be quite hairy (especially because when there is only one unnamed parameter it should be the contents, but when there are two unnamed parameters most people would expect the title to come first).
  • The contents is likely to have a "=" character, which would break the unnamed parameter anyway. Furthermore, this issue can catch unwitting editors by surprise and can be quite difficult to debug.