Template:Question

explain xkcd: It's 'cause you're dumb.
(Redirected from Template:question)
Jump to navigation Jump to search

This template is used for inserting the question and reader's name in the second column of the what if? articles index. See also {{Article}} and {{what if}}.

Usage[edit]

{{Question|question text|reader's name}}

The first parameter is the question itself, displayed in italics and enclosed in quotation marks.

The second parameter is the reader's name, displayed right-aligned on the line below, preceded by an em dash. If provided, the name is also used to set an anchor id on that row (suitably sanitised, if necessary) so that it can be linked to directly, in the same way as {{what if}}). Try jumping to #Questioner in the Examples below, for instance.

If the reader's name is not available, add noreader=yes in place of the normal second parameter: {{Question|question text|noreader=yes}} In this case, no reader line is made visible at all.

Any other combination produces a visible error message instead of silently failing, as demonstrated by the Examples below:

  • Giving a second parameter together with |noreader=yes produces an error, since the two are contradictory.
  • Omitting the second parameter without |noreader=yes produces an error, on the assumption that its absence without explicit acknowledgement is a mistake.
  • Besides this, other attempts to use excess parameters (e.g. three) or insufficient ones (e.g. none at all) also prompt suitably rendered alerts.

Examples[edit]

Valid question explicitly with "no reader"

  • "Question"

Valid question with a named reader, by the name of Questioner

  • "Another question"
Questioner


Error of a Question given, not being explicitly "no reader", but also no reader named - Resolve this by adding one or the other

  • "Further question"
Error! Parameter 2 (reader's name) is required. If Randall did not mention a reader, please add |noreader=yes

Error of a Question explicitly with no reader, yet a named reader was given anyway - Resolve this by removing the incorrect item

  • "Additional question"
Error! Parameter 2 should not be given when noreader=yes

Error of a Question with a Reader and something else - Resolve this by removing the excess information

  • "One more question"
Error! {{Question}} only accepts exactly two unnamed parameters


Error of template being used with no information at all

  • ""
Error! {{Question}} must have the stated parameters

Error of no Question at all, and also explicitly lacking a reader

  • ""
Error! {{Question}} must have the stated parameters

Error of no Question, and yet a potential reader-name option provided anyway

  • ""
Error! {{Question}} must have the stated parameters
- Resolve all of these by adding all missing information