ModuleDoc:Ref
From Halopedia, the Halo wiki
This is the documentation page for Module:Ref
This module provides the backend implementations of the Ref templates.
Public Functions
ref.ref
Invocation entry point for Template:Ref. Takes arguments Id, Name, Group and Text from the template parser frame and constructs the appropriate reference.
Parameters:
- frame (object) - The current parser frame
Returns:
wikitext - the constructed reference
ref.list
Invocation entry point for Template:Ref/List. Takes argument Group from the template parser frame and constructs the appropriate reference list.
Parameters:
- frame (object) - The current parser frame
Returns:
wikitext - the constructed reference list
ref.generic
Invocation entry point for Template:Ref/Generic.
Parameters:
- frame (object) - The current parser frame
Returns:
wikitext - the constructed reference
ref.game
Invocation entry point for Template:Ref/Game.
Parameters:
- frame (object) - The current parser frame
Returns:
wikitext - the constructed reference
ref.file
Invocation entry point for Template:Ref/File.
Parameters:
- frame (object) - The current parser frame
Returns:
wikitext - the constructed reference
Private Functions
makeRef
Constructs a reference with the given text, using the provided parser frame, ref id and group.
Parameters:
- frame (object) - The current parser frame
- id (string) - The id to give to the reference
- group (string) - The group to include the reference in
- text (string) - The text of the reference
Returns:
wikitext - the constructed reference
makeStandardRef
Constructs a standard format reference using the given parameters, with the provided content. Content table supports unlimited numeric arguments, in addition to Subheading, Detail, Quote, Quotee and Suffix arguments.
Parameters:
- frame (object) - The current parser frame
- id (string) - The id to give to the reference
- group (string) - The group to include the reference in
- content (table) - The content of the reference
Returns:
wikitext - the constructed reference
makeRefText
Generates the text content of a standard format reference from the provided arguments. Content table supports unlimited numeric arguments, in addition to subheading, detail, quote, quotee and suffix arguments.
Parameters:
- content (table) - The content of the reference
Returns:
wikitext - the constructed reference text
makeReuse
Constructs wikitext to reuse an existing reference with the given id, in the given group.
Parameters:
- frame (object) - The current parser frame
- id (string) - The id to give to the reference
- group (string) - The group to include the reference in
Returns:
wikitext - the constructed reference reuse wikitext
makeList
Constructs the list of references in a given group.
Parameters:
- frame (object) - The current parser frame
- group (string) - The reference group to list
- colNum (int) - The number of columns to use in the list
- colWidth (int) - The width list columns should be
- colGap (int) - The size of the gap between list columns
Returns:
wikitext - the constructed reference
uniqueLink
uniqueLinkIfExists
acronym
Code
A copy of the code for this module follows: