<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://linguifex.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3Acategory_tree</id>
	<title>Module:category tree - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://linguifex.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3Acategory_tree"/>
	<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:category_tree&amp;action=history"/>
	<updated>2026-04-06T16:24:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://linguifex.com/w/index.php?title=Module:category_tree&amp;diff=230900&amp;oldid=prev</id>
		<title>Sware at 20:21, 13 July 2021</title>
		<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:category_tree&amp;diff=230900&amp;oldid=prev"/>
		<updated>2021-07-13T20:21:08Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:21, 13 July 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l67&quot;&gt;Line 67:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 67:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		&amp;quot;getAppendix&amp;quot;,&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		&amp;quot;getAppendix&amp;quot;,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	if current then&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		for i, functionName in pairs(functions) do&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;			if type(current[functionName]) ~= &quot;function&quot; then&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;				require(&quot;Module:debug&quot;).track{ &quot;category tree/missing function&quot;, &quot;category tree/missing function/&quot; .. functionName }&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;			end&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		end&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	end&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local boxes = {}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local boxes = {}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l205&quot;&gt;Line 205:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 197:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	for _, parent in ipairs(parents) do&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	for _, parent in ipairs(parents) do&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		if type(parent.name) == &amp;quot;string&amp;quot; then&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		if type(parent.name) == &amp;quot;string&amp;quot; then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;			if not (current._lang and current:getCategoryName() == capitalize(current._lang:getCategoryName())) and not (current._sc and current:getCategoryName():find(capitalize(current._sc:getCategoryName()), nil, true)) and current:getInfo().code then&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;				require(&quot;Module:debug&quot;).track(&quot;category tree/string&quot;)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;			end&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			table.insert(categories, &amp;quot;[[&amp;quot; .. parent.name .. &amp;quot;|&amp;quot; .. parent.sort .. &amp;quot;]]&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			table.insert(categories, &amp;quot;[[&amp;quot; .. parent.name .. &amp;quot;|&amp;quot; .. parent.sort .. &amp;quot;]]&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sware</name></author>
	</entry>
	<entry>
		<id>https://linguifex.com/w/index.php?title=Module:category_tree&amp;diff=228927&amp;oldid=prev</id>
		<title>Sware: Created page with &quot;local export = {}  local m_utilities = require(&quot;Module:utilities&quot;) local inFundamental = mw.loadData(&quot;Module:category tree/data&quot;)  local show_error, check_name, link_box, show...&quot;</title>
		<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:category_tree&amp;diff=228927&amp;oldid=prev"/>
		<updated>2021-06-08T10:30:24Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local export = {}  local m_utilities = require(&amp;quot;Module:utilities&amp;quot;) local inFundamental = mw.loadData(&amp;quot;Module:category tree/data&amp;quot;)  local show_error, check_name, link_box, show...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local export = {}&lt;br /&gt;
&lt;br /&gt;
local m_utilities = require(&amp;quot;Module:utilities&amp;quot;)&lt;br /&gt;
local inFundamental = mw.loadData(&amp;quot;Module:category tree/data&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
local show_error, check_name, link_box, show_catfix, show_categories, show_intro, show_editlink, show_pagelist,&lt;br /&gt;
	show_breadcrumbs, show_description, show_appendix, show_children, show_TOC&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
local function capitalize(text)&lt;br /&gt;
	return mw.getContentLanguage():ucfirst(text)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- The main entry point.&lt;br /&gt;
-- This is the only function that can be invoked from a template.&lt;br /&gt;
function export.show(frame)&lt;br /&gt;
	local template = frame.args[&amp;quot;template&amp;quot;]&lt;br /&gt;
	&lt;br /&gt;
	if not template or template == &amp;quot;&amp;quot; then&lt;br /&gt;
		error(&amp;quot;The \&amp;quot;template\&amp;quot; parameter was not specified.&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if mw.title.getCurrentTitle().nsText == &amp;quot;Template&amp;quot; then&lt;br /&gt;
		local text = {}&lt;br /&gt;
		table.insert(text, &amp;quot;This template should be used on pages in the Category: namespace, &amp;quot;)&lt;br /&gt;
		table.insert(text, &amp;quot;and automatically generates descriptions and categorization for categories of a recognized type (see below).&amp;quot;)&lt;br /&gt;
		table.insert(text, &amp;quot; It is implemented by [[Module:category tree]] and its submodule [[Module:category tree/&amp;quot;)&lt;br /&gt;
		table.insert(text, template .. &amp;quot;]].&amp;quot;)&lt;br /&gt;
		if frame.args[&amp;quot;useautocat&amp;quot;] then&lt;br /&gt;
			table.insert(text, &amp;quot; It is preferable not to invoke this template directly, but to simply use &amp;quot;)&lt;br /&gt;
			table.insert(text, require(&amp;quot;Module:template link&amp;quot;).format_link({&amp;quot;auto cat&amp;quot;}))&lt;br /&gt;
			table.insert(text, &amp;quot; (with no parameters), which will automatically invoke this template on appropriately-named category pages.&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
		return table.concat(text)&lt;br /&gt;
	elseif mw.title.getCurrentTitle().nsText ~= &amp;quot;Category&amp;quot; then&lt;br /&gt;
		error(&amp;quot;This template/module can only be used on pages in the Category: namespace.&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local submodule = require(&amp;quot;Module:category tree/&amp;quot; .. template)&lt;br /&gt;
	&lt;br /&gt;
	-- Get all the parameters and the label data&lt;br /&gt;
	local current&lt;br /&gt;
	&lt;br /&gt;
	if submodule.new_main then&lt;br /&gt;
		current = submodule.new_main(frame)&lt;br /&gt;
	else&lt;br /&gt;
		local info = {}&lt;br /&gt;
		&lt;br /&gt;
		for key, val in pairs(frame.args) do&lt;br /&gt;
			if val ~= &amp;quot;&amp;quot; and key ~= &amp;quot;useautocat&amp;quot; then&lt;br /&gt;
				info[key] = val&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	&lt;br /&gt;
		info.template = nil&lt;br /&gt;
		current = submodule.new(info, true)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local functions = {&lt;br /&gt;
		&amp;quot;getBreadcrumbName&amp;quot;,&lt;br /&gt;
		&amp;quot;getDataModule&amp;quot;,&lt;br /&gt;
		&amp;quot;canBeEmpty&amp;quot;,&lt;br /&gt;
		&amp;quot;getDescription&amp;quot;,&lt;br /&gt;
		&amp;quot;getParents&amp;quot;,&lt;br /&gt;
		&amp;quot;getChildren&amp;quot;,&lt;br /&gt;
		&amp;quot;getUmbrella&amp;quot;,&lt;br /&gt;
		&amp;quot;getAppendix&amp;quot;,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	if current then&lt;br /&gt;
		for i, functionName in pairs(functions) do&lt;br /&gt;
			if type(current[functionName]) ~= &amp;quot;function&amp;quot; then&lt;br /&gt;
				require(&amp;quot;Module:debug&amp;quot;).track{ &amp;quot;category tree/missing function&amp;quot;, &amp;quot;category tree/missing function/&amp;quot; .. functionName }&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local boxes = {}&lt;br /&gt;
	local display = {}&lt;br /&gt;
	local categories = {}&lt;br /&gt;
&lt;br /&gt;
	if template == &amp;quot;topic cat&amp;quot; then&lt;br /&gt;
		table.insert(categories, &amp;quot;[[Category:topic cat]]&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Check if the category is empty&lt;br /&gt;
	local isEmpty = mw.site.stats.pagesInCategory(mw.title.getCurrentTitle().text, &amp;quot;all&amp;quot;) == 0&lt;br /&gt;
	&lt;br /&gt;
	-- Are the parameters valid?&lt;br /&gt;
	if not current then&lt;br /&gt;
		table.insert(categories, &amp;quot;[[Category:Categories with invalid label]]&amp;quot;)&lt;br /&gt;
		table.insert(categories, isEmpty and &amp;quot;[[Category:Empty categories]]&amp;quot; or nil)&lt;br /&gt;
		table.insert(display, show_error(&lt;br /&gt;
			&amp;quot;The label given to the &amp;quot; ..&lt;br /&gt;
			require(&amp;quot;Module:template link&amp;quot;).format_link{template} ..&lt;br /&gt;
			&amp;quot; template is not valid. You may have mistyped it, or it simply has not been created yet. &amp;quot; ..&lt;br /&gt;
			&amp;quot;To add a new label, please consult the documentation of the template.&amp;quot;))&lt;br /&gt;
		&lt;br /&gt;
		-- Exit here, as all code beyond here relies on current not being nil&lt;br /&gt;
		return table.concat(categories, &amp;quot;&amp;quot;) .. table.concat(display, &amp;quot;\n\n&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Does the category have the correct name?&lt;br /&gt;
	if mw.title.getCurrentTitle().text ~= current:getCategoryName() then&lt;br /&gt;
		table.insert(categories, &amp;quot;[[Category:Categories with incorrect name]]&amp;quot;)&lt;br /&gt;
		table.insert(display, show_error(&lt;br /&gt;
			&amp;quot;Based on the parameters given to the &amp;quot; ..&lt;br /&gt;
			require(&amp;quot;Module:template link&amp;quot;).format_link{template} ..&lt;br /&gt;
			&amp;quot; template, this category should be called &amp;#039;&amp;#039;&amp;#039;[[:Category:&amp;quot; .. current:getCategoryName() .. &amp;quot;]]&amp;#039;&amp;#039;&amp;#039;.&amp;quot;))&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Add cleanup category for empty categories&lt;br /&gt;
	local canBeEmpty = current:canBeEmpty()&lt;br /&gt;
	if isEmpty and not canBeEmpty then&lt;br /&gt;
		table.insert(categories, &amp;quot;[[Category:Empty categories]]&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if current:isHidden() then&lt;br /&gt;
		table.insert(categories, &amp;quot;__HIDDENCAT__&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if canBeEmpty then&lt;br /&gt;
		table.insert(categories, &amp;quot; __EXPECTUNUSEDCATEGORY__&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	table.insert(boxes, show_intro(current))&lt;br /&gt;
	table.insert(boxes, show_editlink(current))&lt;br /&gt;
	table.insert(boxes, show_related_changes())&lt;br /&gt;
	table.insert(boxes, show_pagelist(current))&lt;br /&gt;
	&lt;br /&gt;
	-- Generate the displayed information&lt;br /&gt;
	table.insert(display, show_breadcrumbs(current))&lt;br /&gt;
	table.insert(display, show_description(current))&lt;br /&gt;
	table.insert(display, show_appendix(current))&lt;br /&gt;
	table.insert(display, show_children(current))&lt;br /&gt;
	table.insert(display, show_TOC(current))&lt;br /&gt;
	table.insert(display, show_catfix(current))&lt;br /&gt;
	&lt;br /&gt;
	show_categories(current, categories)&lt;br /&gt;
	&lt;br /&gt;
	return table.concat(boxes, &amp;quot;\n&amp;quot;) .. &amp;quot;\n&amp;quot; .. table.concat(display, &amp;quot;\n\n&amp;quot;) .. table.concat(categories, &amp;quot;&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function show_error(text)&lt;br /&gt;
	return  mw.getCurrentFrame():expandTemplate{title = &amp;quot;maintenance box&amp;quot;, args = {&lt;br /&gt;
		&amp;quot;red&amp;quot;,&lt;br /&gt;
		image = &amp;quot;[[File:Ambox warning pn.svg|50px]]&amp;quot;,&lt;br /&gt;
		title = &amp;quot;The automatically-generated contents of this category has errors.&amp;quot;,&lt;br /&gt;
		text = text,&lt;br /&gt;
		}}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Check the name of the current page, and return an error if it&amp;#039;s not right.&lt;br /&gt;
function check_name(current, template, info)&lt;br /&gt;
	local errortext = nil&lt;br /&gt;
	local category = nil&lt;br /&gt;
	&lt;br /&gt;
	if not current then&lt;br /&gt;
		errortext =&lt;br /&gt;
			&amp;quot;The label \&amp;quot;&amp;quot; .. (info.label or &amp;quot;&amp;quot;) .. &amp;quot;\&amp;quot; given to the &amp;quot; ..&lt;br /&gt;
			require(&amp;quot;Module:template link&amp;quot;).format_link{template} .. &amp;quot; template is not valid. &amp;quot; ..&lt;br /&gt;
			&amp;quot;You may have mistyped it, or it simply has not been created yet. To add a new label, please consult the documentation of the template.&amp;quot;&lt;br /&gt;
		category = &amp;quot;[[Category:Categories with invalid label]]&amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
		&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if errortext then&lt;br /&gt;
		return (category or &amp;quot;&amp;quot;) .. show_error(errortext)&lt;br /&gt;
	else&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function get_catfix_info(current)&lt;br /&gt;
	local lang, sc&lt;br /&gt;
	if current.getCatfixInfo then&lt;br /&gt;
		lang, sc = current:getCatfixInfo()&lt;br /&gt;
	elseif not (current._info and current._info.no_catfix) then&lt;br /&gt;
		-- FIXME: This is hacky and should be removed.&lt;br /&gt;
		lang = current._lang&lt;br /&gt;
		sc = current._info and current._info.sc and require(&amp;quot;Module:scripts&amp;quot;).getByCode(current._info.sc) or nil&lt;br /&gt;
	end&lt;br /&gt;
	return lang, sc&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Show the &amp;quot;catfix&amp;quot; that adds language attributes and script classes to the page.&lt;br /&gt;
function show_catfix(current)&lt;br /&gt;
	local lang, sc = get_catfix_info(current)&lt;br /&gt;
	if lang then&lt;br /&gt;
		return m_utilities.catfix(lang, sc)&lt;br /&gt;
	else&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Show the parent categories that the current category should be placed in.&lt;br /&gt;
function show_categories(current, categories)&lt;br /&gt;
	local parents = current:getParents()&lt;br /&gt;
	&lt;br /&gt;
	if not parents then&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for _, parent in ipairs(parents) do&lt;br /&gt;
		if type(parent.name) == &amp;quot;string&amp;quot; then&lt;br /&gt;
			if not (current._lang and current:getCategoryName() == capitalize(current._lang:getCategoryName())) and not (current._sc and current:getCategoryName():find(capitalize(current._sc:getCategoryName()), nil, true)) and current:getInfo().code then&lt;br /&gt;
				require(&amp;quot;Module:debug&amp;quot;).track(&amp;quot;category tree/string&amp;quot;)&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			table.insert(categories, &amp;quot;[[&amp;quot; .. parent.name .. &amp;quot;|&amp;quot; .. parent.sort .. &amp;quot;]]&amp;quot;)&lt;br /&gt;
		else&lt;br /&gt;
			table.insert(categories, &amp;quot;[[Category:&amp;quot; .. parent.name:getCategoryName() .. &amp;quot;|&amp;quot; .. parent.sort .. &amp;quot;]]&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Also put the category in its corresponding &amp;quot;umbrella&amp;quot; or &amp;quot;by language&amp;quot; category.&lt;br /&gt;
	local umbrella = current:getUmbrella()&lt;br /&gt;
	&lt;br /&gt;
	if umbrella then&lt;br /&gt;
		local sort&lt;br /&gt;
		if current._lang then&lt;br /&gt;
			sort = current._lang:getCanonicalName()&lt;br /&gt;
		else&lt;br /&gt;
			sort = current:getCategoryName()&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if type(umbrella) == &amp;quot;string&amp;quot; then&lt;br /&gt;
			table.insert(categories, &amp;quot;[[&amp;quot; .. umbrella .. &amp;quot;|&amp;quot; .. sort .. &amp;quot;]]&amp;quot;)&lt;br /&gt;
		else&lt;br /&gt;
			table.insert(categories, &amp;quot;[[Category:&amp;quot; .. umbrella:getCategoryName() .. &amp;quot;|&amp;quot; .. sort .. &amp;quot;]]&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function link_box(content)&lt;br /&gt;
	return &amp;quot;&amp;lt;div class=\&amp;quot;noprint plainlinks\&amp;quot; style=\&amp;quot;float: right; clear: both; margin: 0 0 .5em 1em; background: #f9f9f9; border: 1px #aaaaaa solid; margin-top: -1px; padding: 5px; font-weight: bold;\&amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
		.. content .. &amp;quot;&amp;lt;/div&amp;gt;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function show_related_changes()&lt;br /&gt;
	local title = mw.title.getCurrentTitle().fullText&lt;br /&gt;
	return link_box(&lt;br /&gt;
		&amp;quot;[&amp;quot;&lt;br /&gt;
		.. tostring(mw.uri.fullUrl(&amp;quot;Special:RecentChangesLinked&amp;quot;, {&lt;br /&gt;
			target = title,&lt;br /&gt;
			showlinkedto = 0,&lt;br /&gt;
		}))&lt;br /&gt;
		.. &amp;#039; &amp;lt;span title=&amp;quot;Recent edits and other changes to pages in &amp;#039; .. title .. &amp;#039;&amp;quot;&amp;gt;Recent changes&amp;lt;/span&amp;gt;]&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function show_editlink(current)&lt;br /&gt;
	return link_box(&lt;br /&gt;
		&amp;quot;[&amp;quot; .. tostring(mw.uri.fullUrl(current:getDataModule(), &amp;quot;action=edit&amp;quot;))&lt;br /&gt;
		.. &amp;quot; Edit category data]&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function show_pagelist(current)&lt;br /&gt;
	local namespace = &amp;quot;&amp;quot;&lt;br /&gt;
	local info = current:getInfo()&lt;br /&gt;
	&lt;br /&gt;
	if info.label == &amp;quot;citations&amp;quot; or info.label == &amp;quot;citations of undefined terms&amp;quot; then&lt;br /&gt;
		namespace = &amp;quot;Citations&amp;quot;&lt;br /&gt;
	elseif info.code then&lt;br /&gt;
		local lang = require(&amp;quot;Module:languages&amp;quot;).getByCode(info.code)&lt;br /&gt;
		&lt;br /&gt;
		if lang then&lt;br /&gt;
			if lang:getType() == &amp;quot;reconstructed&amp;quot; then&lt;br /&gt;
				namespace = &amp;quot;Reconstruction&amp;quot;&lt;br /&gt;
			elseif lang:getType() == &amp;quot;appendix-constructed&amp;quot; then&lt;br /&gt;
				namespace = &amp;quot;Appendix&amp;quot;&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local recent = mw.getCurrentFrame():callParserFunction{&lt;br /&gt;
		name = &amp;quot;#tag&amp;quot;,&lt;br /&gt;
		args = {&lt;br /&gt;
			&amp;quot;DynamicPageList&amp;quot;,&lt;br /&gt;
			&amp;quot;category=&amp;quot; .. mw.title.getCurrentTitle().text .. &amp;quot;\n&amp;quot; ..&lt;br /&gt;
			&amp;quot;namespace=&amp;quot; .. namespace .. &amp;quot;\n&amp;quot; ..&lt;br /&gt;
			&amp;quot;count=10\n&amp;quot; ..&lt;br /&gt;
			&amp;quot;mode=ordered\n&amp;quot; ..&lt;br /&gt;
			&amp;quot;ordermethod=categoryadd\n&amp;quot; ..&lt;br /&gt;
			&amp;quot;order=descending&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	local oldest = mw.getCurrentFrame():callParserFunction{&lt;br /&gt;
		name = &amp;quot;#tag&amp;quot;,&lt;br /&gt;
		args = {&lt;br /&gt;
			&amp;quot;DynamicPageList&amp;quot;,&lt;br /&gt;
			&amp;quot;category=&amp;quot; .. mw.title.getCurrentTitle().text .. &amp;quot;\n&amp;quot; ..&lt;br /&gt;
			&amp;quot;namespace=&amp;quot; .. namespace .. &amp;quot;\n&amp;quot; ..&lt;br /&gt;
			&amp;quot;count=10\n&amp;quot; ..&lt;br /&gt;
			&amp;quot;mode=ordered\n&amp;quot; ..&lt;br /&gt;
			&amp;quot;ordermethod=lastedit\n&amp;quot; ..&lt;br /&gt;
			&amp;quot;order=ascending&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	return [=[&lt;br /&gt;
{| id=&amp;quot;newest-and-oldest-pages&amp;quot; class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float: right; clear: both; margin: 0 0 .5em 1em;&amp;quot;&lt;br /&gt;
! Recent additions to the category&lt;br /&gt;
|-&lt;br /&gt;
| id=&amp;quot;recent-additions&amp;quot; style=&amp;quot;font-size:0.9em;&amp;quot; | ]=] .. recent .. [=[&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Oldest pages ordered by last edit&lt;br /&gt;
|-&lt;br /&gt;
| id=&amp;quot;oldest-pages&amp;quot; style=&amp;quot;font-size:0.9em;&amp;quot; | ]=] .. oldest .. [=[&lt;br /&gt;
&lt;br /&gt;
|}]=]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Show navigational &amp;quot;breadcrumbs&amp;quot; at the top of the page.&lt;br /&gt;
function show_breadcrumbs(current)&lt;br /&gt;
	local steps = {}&lt;br /&gt;
	&lt;br /&gt;
	-- Start at the current label and move our way up the &amp;quot;chain&amp;quot; from child to parent, until we can&amp;#039;t go further.&lt;br /&gt;
	while current do&lt;br /&gt;
		local category = nil&lt;br /&gt;
		local display_name = nil&lt;br /&gt;
		local nocap = nil&lt;br /&gt;
		&lt;br /&gt;
		if type(current) == &amp;quot;string&amp;quot; then&lt;br /&gt;
			category = current&lt;br /&gt;
			display_name = current:gsub(&amp;quot;^Category:&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
		else&lt;br /&gt;
			category = &amp;quot;Category:&amp;quot; .. current:getCategoryName()&lt;br /&gt;
			display_name, nocap = current:getBreadcrumbName()&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if not nocap then&lt;br /&gt;
			display_name = capitalize(display_name)&lt;br /&gt;
		end&lt;br /&gt;
		table.insert(steps, 1, &amp;quot;[[:&amp;quot; .. category .. &amp;quot;|&amp;quot; .. display_name .. &amp;quot;]]&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
		-- Move up the &amp;quot;chain&amp;quot; by one level.&lt;br /&gt;
		if type(current) == &amp;quot;string&amp;quot; then&lt;br /&gt;
			current = nil&lt;br /&gt;
		else&lt;br /&gt;
			current = current:getParents()&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if current then&lt;br /&gt;
			current = current[1].name&lt;br /&gt;
		elseif inFundamental[category] then&lt;br /&gt;
			current = &amp;quot;Category:Fundamental&amp;quot;&lt;br /&gt;
		end	&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	steps = table.concat(steps, &amp;quot; » &amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	return &amp;quot;&amp;lt;small&amp;gt;&amp;quot; .. steps .. &amp;quot;&amp;lt;/small&amp;gt;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Show the intro text that goes at the very top of the page.&lt;br /&gt;
function show_intro(current)&lt;br /&gt;
	return (current.getIntro and current:getIntro() or &amp;quot;&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Show a short description text for the category.&lt;br /&gt;
function show_description(current)&lt;br /&gt;
	return (current:getDescription() or &amp;quot;&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function show_appendix(current)&lt;br /&gt;
	local appendix&lt;br /&gt;
	&lt;br /&gt;
	if current.getAppendix then&lt;br /&gt;
		appendix = current:getAppendix()&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if appendix then&lt;br /&gt;
		return &amp;quot;For more information, see [[&amp;quot; .. appendix .. &amp;quot;]].&amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Show a list of child categories.&lt;br /&gt;
function show_children(current)&lt;br /&gt;
	local children = current:getChildren()&lt;br /&gt;
	&lt;br /&gt;
	if not children then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	table.sort(children, function(first, second) return first.sort &amp;lt; second.sort end)&lt;br /&gt;
	&lt;br /&gt;
	local children_list = {}&lt;br /&gt;
	&lt;br /&gt;
	for _, child in ipairs(children) do&lt;br /&gt;
		local child_pagetitle&lt;br /&gt;
		if type(child.name) == &amp;quot;string&amp;quot; then&lt;br /&gt;
			child_pagetitle = child.name&lt;br /&gt;
		else&lt;br /&gt;
			child_pagetitle = &amp;quot;Category:&amp;quot; .. child.name:getCategoryName()&lt;br /&gt;
		end&lt;br /&gt;
		local child_page = mw.title.new(child_pagetitle)&lt;br /&gt;
		&lt;br /&gt;
		if child_page.exists then&lt;br /&gt;
			local child_description =&lt;br /&gt;
				child.description or&lt;br /&gt;
				type(child.name) == &amp;quot;string&amp;quot; and child.name:gsub(&amp;quot;^Category:&amp;quot;, &amp;quot;&amp;quot;) .. &amp;quot;.&amp;quot; or&lt;br /&gt;
				child.name:getDescription(&amp;quot;child&amp;quot;)&lt;br /&gt;
			table.insert(children_list, &amp;quot;* [[:&amp;quot; .. child_pagetitle .. &amp;quot;]]: &amp;quot; .. child_description)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return table.concat(children_list, &amp;quot;\n&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Show a table of contents with links to each letter in the language&amp;#039;s script.&lt;br /&gt;
function show_TOC(current)&lt;br /&gt;
	local titleText = mw.title.getCurrentTitle().text&lt;br /&gt;
	&lt;br /&gt;
	local inCategoryPages = mw.site.stats.pagesInCategory(titleText, &amp;quot;pages&amp;quot;)&lt;br /&gt;
	local inCategorySubcats = mw.site.stats.pagesInCategory(titleText, &amp;quot;subcats&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	local TOC_type&lt;br /&gt;
&lt;br /&gt;
	-- Compute type of table of contents required.&lt;br /&gt;
	if inCategoryPages &amp;gt; 2500 or inCategorySubcats &amp;gt; 2500 then&lt;br /&gt;
		TOC_type = &amp;quot;full&amp;quot;&lt;br /&gt;
	elseif inCategoryPages &amp;gt; 200 or inCategorySubcats &amp;gt; 200 then&lt;br /&gt;
		TOC_type = &amp;quot;normal&amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
		-- No (usual) need for a TOC if all pages or subcategories can fit on one page;&lt;br /&gt;
		-- but allow this to be overridden by a custom TOC handler.&lt;br /&gt;
		TOC_type = &amp;quot;none&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if current.getTOC then&lt;br /&gt;
		local TOC_text = current:getTOC(TOC_type)&lt;br /&gt;
		if TOC_text ~= true then&lt;br /&gt;
			return TOC_text&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if TOC_type ~= &amp;quot;none&amp;quot; then&lt;br /&gt;
		local lang, sc = get_catfix_info(current)&lt;br /&gt;
		local code = lang and lang:getCode() or &amp;quot;en&amp;quot;&lt;br /&gt;
&lt;br /&gt;
		local TOC_template&lt;br /&gt;
		if TOC_type == &amp;quot;full&amp;quot; then&lt;br /&gt;
			-- This category is very large, see if there is a &amp;quot;full&amp;quot; version of the TOC.&lt;br /&gt;
			local TOC_template_full = mw.title.new(&amp;quot;Template:&amp;quot; .. code .. &amp;quot;-categoryTOC/full&amp;quot;)&lt;br /&gt;
			&lt;br /&gt;
			if TOC_template_full.exists then&lt;br /&gt;
				TOC_template = TOC_template_full&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if not TOC_template then&lt;br /&gt;
			local TOC_template_normal = mw.title.new(&amp;quot;Template:&amp;quot; .. code .. &amp;quot;-categoryTOC&amp;quot;)&lt;br /&gt;
			if TOC_template_normal.exists then&lt;br /&gt;
				TOC_template = TOC_template_normal&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if TOC_template then&lt;br /&gt;
			return mw.getCurrentFrame():expandTemplate{title = TOC_template.text, args = {}}&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function export.test(frame)&lt;br /&gt;
	local template = frame.args[1]&lt;br /&gt;
	local submodule = require(&amp;quot;Module:category tree/&amp;quot; .. template)&lt;br /&gt;
	&lt;br /&gt;
	if submodule.new_main then&lt;br /&gt;
		current = submodule.new_main(frame)&lt;br /&gt;
	else&lt;br /&gt;
		local info = {}&lt;br /&gt;
		&lt;br /&gt;
		for key, val in pairs(frame.args) do&lt;br /&gt;
			info[key] = val; if info[key] == &amp;quot;&amp;quot; then info[key] = nil end&lt;br /&gt;
		end&lt;br /&gt;
	&lt;br /&gt;
		info.template = nil&lt;br /&gt;
		current = submodule.new(info, true)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return export&lt;/div&gt;</summary>
		<author><name>Sware</name></author>
	</entry>
</feed>