Module:WikiFur: Difference between revisions

From WikiFur Data
Jump to navigation Jump to search
(Needs mw?)
Tags: Mobile edit Mobile web edit Advanced mobile edit
No edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
local p = {}
local p = {}


function p.ID()
function p.ID(frame)
   return mw.wikibase.getEntityIdForCurrentPage();
   -- This seemingly only works with sitelinks
  -- return mw.wikibase.getEntityIdForCurrentPage();
  -- This only works inside pages, not Sitenotice
  return frame:getParent():getTitle();
  -- This just returns the module itself
  -- return frame:getTitle();
end
 
function p.Label(frame)
  return mw.wikibase.getLabel(frame.args.id);
end
end


return p;
return p;

Latest revision as of 15:14, 27 October 2023

Documentation for this module may be created at Module:WikiFur/doc

local p = {}

function p.ID(frame)
  -- This seemingly only works with sitelinks
  -- return mw.wikibase.getEntityIdForCurrentPage();
  -- This only works inside pages, not Sitenotice 
  return frame:getParent():getTitle();
  -- This just returns the module itself 
  -- return frame:getTitle();
end

function p.Label(frame)
  return mw.wikibase.getLabel(frame.args.id);
end

return p;