Module:Updates/doc

From Dune: Awakening Community Wiki
Jump to navigation Jump to search

This is the documentation page for Module:Updates

Module:Updates

Determines previous and next update versions, relative to a specified version string, using the manually-ordered dataset defined in Module:Updates/data.

Usage

Inside Template:UpdateInfobox

The module is invoked by the template to render navigation buttons.

{{#invoke:Updates|get|{{{version|{{PAGENAME}}}}}}}

The version parameter defaults to the current page name if not specified. The module returns a Template:InfoboxNavRow invocation with the previous and next update versions as parameters.

Parameters

get

1
string
The version string corresponding to an entry in Module:Updates/data.

Notes

  • Version ordering is determined entirely by the sequence defined in Module:Updates/data, thus the dataset must remain sorted in ascending version order for navigation to function correctly.
  • If the provided version does not exist in the dataset, a warning message is returned that will display in the infobox.
  • The module uses frame:preprocess() to expand the Template:InfoboxNavRow invocation.
    • This carries a performance overhead, which was the reason why Module:Swatches had to be overhauled to render the infobox directly, because it can require displaying tens of infoboxes at one go.
    • On the other hand, it is acceptable in this use case because of the low usage requirements.