Template:Last incident

From Wikitech
No incidents reported in the last 14 days.
Template documentation

Display status bar linking to the most recent incident.

Limitations

  • Special:PrefixIndex has no "sort" parameter, is ascending (A-Z), and does not have a "limit" parameter.
    • This means we can't make it show just the latest title.
  • The result of transcluding a special page is only expanded in post-processing.
    • This means things like #if, #ifeq, or Lua do not "see" that something returned empty string.

How this works

For each of the recent dates, query Special:PrefixIndex with a prefix of that date.
Using the CSS :empty operator, the empty lists are hidden. Also, any lists after the first non-empty one are also hidden. (See Template:Last_incident/styles.css)

See also