Module:SMW JSON: Revision history

Jump to navigation Jump to search
Diff selection: mark the radio boxes of the versions to compare or click on a revision date to view it. (cur) = difference from current version, (prev) = difference from preceding version,  m = minor edit, → = section edit

17 October 2024

  • curprev 00:1300:13, 17 October 2024Alex talk contribs 956 bytes +956 Created page with "local p = {} function p.main(frame) local field = frame.args.field local parent_args = frame:getParent().args p._main(field, parent_args) end function p._main(field, parent_args) if field ~= nil then local args = {} for k, v in pairs(parent_args) do if v == '' then args[k] = nil else args[k] = mw.text.unstrip(v) end end mw.logObject(args) local json = mw.text.jsonEncode(args) mw.smw.set({[field] = json}) end end function p.parse(data,..."