Jump to content

Module:TestModule: Difference between revisions

From NewsWikiTestbed
AdamZachar (talk | contribs)
No edit summary
AdamZachar (talk | contribs)
No edit summary
Line 22: Line 22:
   }
   }


  return parentTopic
  return topics
end
end




return p
return p

Revision as of 11:05, 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 topics
end


return p