Module:TestModule: Difference between revisions
AdamZachar (talk | contribs) No edit summary |
AdamZachar (talk | contribs) No edit summary |
||
| Line 76: | Line 76: | ||
return funcRecurseLineageNumber(frame.args.parentID) | return funcRecurseLineageNumber(frame.args.parentID) | ||
end | |||
function p.topicIDByName( frame ) | |||
local topics, errors = mw.ext.externaldata.getExternalData { | |||
source = "CaseData", | |||
query = "oneTopic", | |||
data = "topicID=topic_id", | |||
parameters = frame.args.topicName | |||
} | |||
if topics == nil then return "N/A" end | |||
return topics.topicID | |||
end | end | ||