Module:Gallery List/Documentation
Jump to navigation
Jump to search
This is the documentation page for Module:Gallery List
This is the main module for the following templates:
In addition, this module exports the following functions.
parseEntry
parseEntry(subject, game, fileType, [options])
Allows other modules such as Module:Data Table to use Template:Gallery List's filename generation syntax.
Parameters
subject
- A wiki article name referring to the subject for which a filename is being generated.
game
- A game code from Data:Franchise.
fileType
- A file type such as
Sprite
orModel
.
[options]
- The options object is passed along to Module:Term#fetchTerm and Module:Term#printTerm, which is used to create the return object unless
useTerms
is false.
Returns
- An object containing a filename, a term link, a term string, and the
subject
received minus any Template:Gallery List syntax.
Examples
# | Input | Output | Status |
---|---|---|---|
1 | parseEntry("Candy (The Minish Cap)", "TMC", "Sprite")
| {
subject = "Candy (The Minish Cap)",
file = "File:TMC Candy Sprite.png",
term = "Candy",
link = "[[Candy (The Minish Cap)#The Minish Cap|Candy]]",
info = "",
}
| |
2 | parseEntry(
"Ore Chunk [Red] <span>(10)</span>",
"OoS",
"Sprite"
)
| {
subject = "Ore Chunk",
file = "File:OoS Ore Chunk Red Sprite.png",
link = "[[Ore Chunk#Oracle of Seasons|Ore Chunk]]",
term = "Ore Chunk",
variant = "Red",
info = " <span>(10)</span>",
}
| |
3 | parseEntry(
"Stained Glass [File:TMC Stained Glass Artwork.png]",
"TMC",
""
)
| {
info = "",
file = "File:TMC Stained Glass Artwork.png",
term = "Stained Glass",
link = "[[Stained Glass#The Minish Cap|Stained Glass]]",
subject = "Stained Glass",
}
| |
4 | parseEntry("Hyper Pico Bloom [No Image]", "TMC", "")
| {
info = "",
file = "File:No Image.png",
term = "Hyper Pico Bloom",
link = "[[Hyper Pico Bloom#The Minish Cap|Hyper Pico Bloom]]",
subject = "Hyper Pico Bloom",
}
| |
5 | parseEntry(
"Deku Tree",
"TWW",
"Figurine Model",
{ useTerms = false }
)
| {
subject = "Deku Tree",
file = "File:TWW Deku Tree Figurine Model.png",
term = "Deku Tree",
link = "[[Deku Tree]]",
info = "",
}
| |
6 | parseEntry("Bomb", "ALttP", "30 Sprite", { plural = true })
| {
subject = "Bomb",
file = "File:ALttP Bombs 30 Sprite.png",
term = "Bombs",
link = "[[Bomb#A Link to the Past|Bombs]]",
info = "",
}
|