Module:EquipmentGallery/doc
Jump to navigation
Jump to search
This is the documentation page for Module:EquipmentGallery
Module:EquipmentGallery
Queries DPL3 for Menu Garments images matching a given item name, parses the filenames into captioned entries, and returns sorted filename~caption lines compatible with Template:Gallery.
This module should not be invoked directly. To add a dynamic image gallery to a Garment page, use Template:EquipmentGallery.
This module provides the following function(s):
main- queries DPL3 for matching garment images, parses the filenames, generates captions, and returns sorted output lines.
Usage
Render a dynamic Equipment gallery
On an Equipment page, via Template:EquipmentGallery:
{{#invoke:EquipmentGallery|main|{{BASEPAGENAME}}}}
Parameters
main
- 1
- string
- The item name used as the parsing anchor within each filename and as the DPL3 query target. Typically passed as
{{BASEPAGENAME}}from the template. - The value is decoded via
mw.text.decode()to handle HTML entities (e.g.'for apostrophes in page titles like'Thopter Pilot Set).
Notes
Filename format
The module expects filenames matching the following structure:
Menu Garments <GENDER> [SWATCH] <ITEM_NAME> [SIDE].jpg
- GENDER
MasculineorFeminine. Required.- SWATCH
- Zero or more words between GENDER and ITEM_NAME. Optional.
- ITEM_NAME
- Must match the item name parameter. Required.
- SIDE
FrontorBack. Optional.