Module:TestModule: Difference between revisions

AdamZachar (talk | contribs)
No edit summary
AdamZachar (talk | contribs)
No edit summary
Line 36: Line 36:
  for i, topic in ipairs(topics) do
  for i, topic in ipairs(topics) do
   output = output .. " <li>" .. "[[" .. topic.topicName .. "]]"
   output = output .. " <li>" .. "[[" .. topic.topicName .. "]]"
  local childTopics, errors3 = mw.ext.externaldata.getExternalData {
  source = "CaseData"
  , query = "childrenTopics"
  , data = "topicName=topic_name"
  , parameters = topic.topicName
  }
  for i, childTopic in ipairs(childTopics) do
  output = output .. " <li>" .. "[[" .. childTopic.topicName .. "]]"
  end
  end
  end
  output = output .. "</ul>"
  output = output .. "</ul>"