Module:TestModule: Difference between revisions

AdamZachar (talk | contribs)
No edit summary
AdamZachar (talk | contribs)
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 94: Line 94:
end
end


function p.topicListByCaseID( frame )
function p.topicListByCaseName( frame )
 
local output = ""


  local topics, errors = mw.ext.externaldata.getExternalData {
  local topics, errors = mw.ext.externaldata.getExternalData {
   source = "CaseData",
   source = "CaseData",
   query = "topicsByCase",
   query = "topicsByCase",
   data = "caseID=case_id",
   data = "topicName=topic_name",
   parameters = frame.args.topicName
   parameters = frame.args.caseTitle
   }
   }


  if topics == nil then return 0 end
  if topics == nil then return output end
 
local output = ""


  output = output .. "<ul>"
  output = output .. "<ul>"