Difference between revisions 21306603 and 21306604 on frwiktionary

local export = {}

-- The main entry point.
-- This is the only function that can be invoked from a template.
function export.show(frame)
	if mw.title.getCurrentTitle().nsText == "Template" then
		return "(This template should be used on pages in the Category: namespace.)"
	elseif mw.title.getCurrentTitle().nsText ~= "Category" then
(contracted; show full)-- Retrieves an item of information
function export.get_item(info, item)
	local submodule = require("Module:category tree/" .. info.template)
	local ret = nil
	
	local functions = {
		["label_exists"] = "exists",

		["parents"] = "getParentLabels",
		["display_name"] = "getBreadcrumbName",
		["edit"] = "getDataModule",
		
		["basic"] = "getBasicName",
		["description"] = "getBasicDescription",
		["parents"] = "getBasicParentLabels",
		
		["umbrella"] = "getUmbrellaName",
		["umbrella_description"] = "getUmbrellaDescription",
		["sortparentumbrella"] = "getUmbrellaSortKey",
		["umbrella-categorization"] = "getUmbrellaCategorizationType",
		
		["fundamental"] = "getFundamentalName",
	}
(contracted; show full)			return mw.getCurrentFrame():expandTemplate{title = TOC_template.text, args = {}}
		end
	end
	
	return nil
end

return export