Module:TestModule: Difference between revisions
Appearance
AdamZachar (talk | contribs) No edit summary |
AdamZachar (talk | contribs) No edit summary |
||
Line 12: | Line 12: | ||
function p.externalDataTest( frame ) | function p.externalDataTest( frame ) | ||
local output = "" | local output = "" | ||
local | local parentTopic = frame.args.parentTopic | ||
local topics, errors = | local topics, errors = | ||
mw.ext.externaldata.getDbData | mw.ext.externaldata.getDbData | ||
Line 19: | Line 19: | ||
query = childrenTopics, | query = childrenTopics, | ||
data = {topicName = topic_name}, | data = {topicName = topic_name}, | ||
parameters = | parameters = parentTopic | ||
} | } | ||
return | return parentTopic | ||
end | end | ||
return p | return p |
Revision as of 11:04, 10 June 2025
local p = {} --p stands for package
function p.hello( frame )
return "Hello, world!"
-- if row.shape == targetShape then
-- output = output .. " <li>" .. "[[" .. row.shape .. "]]"
-- end
end
function p.externalDataTest( frame )
local output = ""
local parentTopic = frame.args.parentTopic
local topics, errors =
mw.ext.externaldata.getDbData
{
source = CaseData,
query = childrenTopics,
data = {topicName = topic_name},
parameters = parentTopic
}
return parentTopic
end
return p