Module:Versions/doc

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

This is the documentation page for Module:Versions

Module:Versions

Provides utility functions related to game versions by referencing the dataset defined in Module:Versions/data.

This module provides the following function(s):

  • latest - returns the latest version string.
  • check - returns whether a given version string exists in the dataset.
  • get - renders an InfoboxNavRow with the prev and next versions populated correspondingly.

Usage

Return latest version

Returns the latest version, i.e. the current last entry in Module:Versions/data, as a string.

{{#invoke:Versions|latest}}

Check whether a version exists

Returns true if the given version string exists in Module:Versions/data, or false otherwise.

{{#invoke:Versions|check|1.3.15.0}}

Inside Template:VersionInfobox

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

{{#invoke:Versions|get|{{{version|{{BASEPAGENAME}}}}}}}

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

latest

<No parameters>

check

1
string
The version string to look up in Module:Versions/data.

get

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