Module:DLC/doc

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

This is the documentation page for Module:DLC

Module:DLC

Renders a DLC infobox using Template:DLCInfobox, sourced from Module:DLC/data with translatable display strings from MessageBundle:DLC.

This module provides the following function(s):

  • get - renders an infobox for a single DLC.
  • latest - renders an infobox for the newest DLC.

Usage

Render infobox for current DLC page

On a DLC page, where the page title matches (via slugification) a DLC key in the dataset:

{{#invoke:DLC|get|{{BASEPAGENAME}}}}

Render infobox for a specific DLC

A specific DLC name can also be provided manually:

{{#invoke:DLC|get|Wildlife of Arrakis}}

Render infobox for the latest DLC

Renders whichever DLC currently has the latest release date in the dataset:

{{#invoke:DLC|latest}}

Include contents list

An optional contents parameter can be passed through to the infobox, typically a bulleted list:

{{#invoke:DLC|get|Wildlife of Arrakis
|contents = 
* [[Wildlife]]-themed Decorations
}}

Parameters

get

1 (required)
string
The DLC name. This is slugified before lookup, so it does not need to exactly match the key casing/formatting used in Module:DLC/data.
Returns an error message if no DLC is specified, or if the slugified name has no match in the dataset.
contents (optional)
string
Wikitext passed through to the infobox's Contents field. Omitted entirely if not provided.

latest

<No parameters>

Notes

get

  • Display strings are resolved via MessageBundle:DLC using the page's current language, with the English source also resolved separately for use as internal/category-facing values.

latest

  • The latest DLC item is determined by the latest date value in the dataset.
  • If multiple entries share that release date, one is selected at random, and this choice may change whenever the page is reparsed (e.g. edit / purge / cache expiry).