Модул:template link/data
Изглед
Документацију овог модула можете да направите на страници Модул:template link/data/док
local deepcopy = require("Module:table").deepcopy
local data = {}
do
local magic_words = mw.loadData("Module:data/magic words")
local data_magic_words = {}
for k, v in pairs(magic_words) do
local link = v.parser_function
if link then
data_magic_words[k .. ":"] = deepcopy(link)
end
link = v.parser_variable
if link then
data_magic_words[k] = link
end
link = v.transclusion_modifier
if link then
data_magic_words[k .. ":"] = link
end
end
data.magic_words = data_magic_words
end
-- Value is the namespace number of the linked page at parameter 0, where 0 is mainspace.
-- If the namespace is the mainspace, it can be overridden by an explicitly specified category (e.g. {{PAGENAME:Category:Foo}} refers to "Category:Foo"). This does not apply to any other namespace (e.g. {{#SPECIAL:Category:Foo}} refers to "Special:Category:Foo").
data.link_parameter_0 = {
["#CATEGORYTREE:"] = 14, -- Category:
["#IFEXIST:"] = 0,
["#INVOKE:"] = 828, -- Module:
["#LST:"] = 0,
["#LSTH:"] = 0,
["#LSTX:"] = 0,
["#SPECIAL:"] = -1, -- Special:
["#SPECIALE:"] = -1, -- Special:
["#TITLEPARTS:"] = 0,
["BASEPAGENAME:"] = 0,
["BASEPAGENAMEE:"] = 0,
["CANONICALURL:"] = 0,
["CANONICALURLE:"] = 0,
["CASCADINGSOURCES:"] = 0,
["FILEPATH:"] = 6, -- File:
["FULLPAGENAME:"] = 0,
["FULLPAGENAMEE:"] = 0,
["FULLURL:"] = 0,
["FULLURLE:"] = 0,
["INT:"] = 8, -- MediaWiki:
["LOCALURL:"] = 0,
["LOCALURLE:"] = 0,
["NAMESPACE:"] = 0,
["NAMESPACEE:"] = 0,
["NAMESPACENUMBER:"] = 0,
["PAGEID:"] = 0,
["PAGENAME:"] = 0,
["PAGENAMEE:"] = 0,
["PAGESINCATEGORY:"] = 14, -- Category:
["PAGESIZE:"] = 0,
["REVISIONDAY:"] = 0,
["REVISIONDAY2:"] = 0,
["REVISIONID:"] = 0,
["REVISIONMONTH:"] = 0,
["REVISIONMONTH1:"] = 0,
["REVISIONTIMESTAMP:"] = 0,
["REVISIONUSER:"] = 0,
["REVISIONYEAR:"] = 0,
["ROOTPAGENAME:"] = 0,
["ROOTPAGENAMEE:"] = 0,
["SUBJECTPAGENAME:"] = 0,
["SUBJECTPAGENAMEE:"] = 0,
["SUBJECTSPACE:"] = 0,
["SUBJECTSPACEE:"] = 0,
["SUBPAGENAME:"] = 0,
["SUBPAGENAMEE:"] = 0,
["TALKPAGENAME:"] = 0,
["TALKPAGENAMEE:"] = 0,
["TALKSPACE:"] = 0,
["TALKSPACEE:"] = 0,
}
-- Value is the namespace number of the linked page at parameter 1.
data.link_parameter_1 = {
["PROTECTIONEXPIRY:"] = 0,
["PROTECTIONLEVEL:"] = 0,
}
return data