Module:TestModule: Difference between revisions
AdamZachar (talk | contribs) No edit summary |
AdamZachar (talk | contribs) No edit summary |
||
| Line 3: | Line 3: | ||
function p.hello( frame ) | function p.hello( frame ) | ||
return "Hello, world!" | return "Hello, world!" | ||
-- if row.shape == targetShape then | |||
-- output = output .. " <li>" .. "[[" .. row.shape .. "]]" | |||
-- end | |||
end | end | ||
function p.externalDataTest( frame ) | function p.externalDataTest( frame ) | ||
local output = "" | local output = "" | ||
local | local parentCase = frame.args.parentCase | ||
local | local topics, errors = | ||
mw.ext.externaldata. | mw.ext.externaldata.getDbData | ||
{ | { | ||
source = CaseData, | |||
data = { | query = childrenTopics, | ||
data = {topicName = topic_name}, | |||
parameters = parentCase | |||
} | } | ||
output = output .. "<ul>" | output = output .. "<ul>" | ||
for i, | for i, topic in ipairs(topics) do | ||
output = output .. " <li>" .. "[[" .. topic.topicName .. "]]" | |||
end | |||
output = output .. "</ul>" | output = output .. "</ul>" | ||