Module:ContractLinkHandler/doc

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

This is the documentation page for Module:ContractLinkHandler

Module:ContractLinkHandler

Builds link targets for one or more Contracts within a Contract Chain, for use by Template:ContractLinkHandler.

This module should not be invoked directly. To link Contracts, use Template:ContractLinkHandler.

This module provides the following function(s):

  • main - returns a tilde-separated list of Chain/Contract|Contract link targets.

Usage

Single contract

{{#invoke:ContractLinkHandler|main|Wrecking Crew|Scrap Mettle}}

Multiple contracts

{{#invoke:ContractLinkHandler|main|Copper Required~Wrecking Crew|Scrap Mettle}}

Parameters

main

1
string
One or more Contract names, separated by tildes ~. Each item is trimmed, and empty items are skipped.
Returns an empty string if no valid names are supplied.
2
string
The Contract Chain name, used as the prefix for every link target.
Returns an error message if not specified.

Notes

  • Output is a tilde-separated string of link targets, not finished wikitext. Pass it to Module:Common's bulletList with link=yes (as Template:InfoboxNavRow does) to render each item as a link.
  • Contract names must not contain ~ or |, as these are reserved for list separation and link display text respectively.