79 548
contributi
(Better solution to support subpages *** sovrascritto il testo esistente ***) |
(Adding support for custom middle link *** sovrascritto il testo esistente ***) |
||
Parameters:
- poke: the Pokémon name
- linksuffix: (optional) the suffix to append to links.
- list: (optional) the page to link in the middle of the prevnext.
--]]
local function basePokePrecSucc(poke, linksuffix, list)
linksuffix = linksuffix or ""
list = list or "Elenco Pokémon secondo il Pokédex Nazionale"
local pokeData = multigen.getGen(pokes[poke] or pokes[mw.text.decode(poke)])
local type1, type2 = pokeData.type1, pokeData.type2
color2 = type2,
series = pokeData.name,
list =
prev = table.concat{"#", prevTf, ": ", prevname},
prevlink = prevname .. linksuffix,
Usage:
{{#invoke: PokePrecSucc | subpage | <Pokémon name> | <suffix> | ... }}
- 1: (optional) the name of a Pokémon. In a Pokémon subpage the suggested value
for this is "{{ROOTPAGENAME}}", that evaluates to the page name that
(often) is the Pokémon name desired.
- 2: (optional) if given, it is used to determine the subpage to link. It
should be the name of the subpage to link without the leading /.
- list: (optional) the page to link from the middle text (the name of the
current Pokémon). Defaults to "Elenco Pokémon secondo il Pokédex Nazionale"
--]]
end
end
local list = frame.args.list and string.trim(frame.args.list)
or "Elenco Pokémon secondo il Pokédex Nazionale"
return basePokePrecSucc(poke, subpageSuffix, list)
end
|