Differenze tra le versioni di "Modulo:PokePrecSucc"

Adding support for custom middle link *** sovrascritto il testo esistente ***
(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. IfIt notdefaults givento
defaults to nothing (ie: links base Pokémon pages). This suffix is appended as is;
appended as is; it's not modified, for instance, adding a leading "/".
- 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 = "Elenco Pokémon secondo il Pokédex Nazionale"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. If not given, itIt defaults to the root page title.
page title.
- 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 /. If notIt
given, it defaults to the same suffix as the page it's invoked in.
- 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
 
79 548

contributi