<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://edfieldmanual.com/index.php?action=history&amp;feed=atom&amp;title=Module%3APageContext</id>
	<title>Module:PageContext - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://edfieldmanual.com/index.php?action=history&amp;feed=atom&amp;title=Module%3APageContext"/>
	<link rel="alternate" type="text/html" href="https://edfieldmanual.com/index.php?title=Module:PageContext&amp;action=history"/>
	<updated>2026-08-25T11:32:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://edfieldmanual.com/index.php?title=Module:PageContext&amp;diff=2121&amp;oldid=prev</id>
		<title>Sythan: Resolve primary, secondary, and content-type page context for article eyebrows</title>
		<link rel="alternate" type="text/html" href="https://edfieldmanual.com/index.php?title=Module:PageContext&amp;diff=2121&amp;oldid=prev"/>
		<updated>2026-08-24T21:58:11Z</updated>

		<summary type="html">&lt;p&gt;Resolve primary, secondary, and content-type page context for article eyebrows&lt;/p&gt;
&lt;a href=&quot;https://edfieldmanual.com/index.php?title=Module:PageContext&amp;amp;diff=2121&amp;amp;oldid=2113&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Sythan</name></author>
	</entry>
	<entry>
		<id>https://edfieldmanual.com/index.php?title=Module:PageContext&amp;diff=2113&amp;oldid=prev</id>
		<title>Sythan: Expose display-safe content type for article header</title>
		<link rel="alternate" type="text/html" href="https://edfieldmanual.com/index.php?title=Module:PageContext&amp;diff=2113&amp;oldid=prev"/>
		<updated>2026-08-24T21:39:46Z</updated>

		<summary type="html">&lt;p&gt;Expose display-safe content type for article header&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&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 21:39, 24 August 2026&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-l280&quot;&gt;Line 280:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 280:&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 args = frame.args or {}&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 args = frame.args or {}&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;	return p.getContentTypeValue(args.page or args[1], args.type or args.contentType)&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;	return p.getContentTypeValue(args.page or args[1], args.type or args.contentType)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;end&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;function p.getDisplayContentType(frame)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	local args = frame.args or {}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	local sectionOverride = args.section or args.primarySection or args.topic&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	local typeOverride = args.type or args.contentType&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	local primary = p.getPrimarySectionValue(args.page or args[1], sectionOverride)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	local contentType = p.getContentTypeValue(args.page or args[1], typeOverride)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	if not isNonEmpty(contentType) then return &#039;&#039; end&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	if primary == (config.fallbackPrimarySection or &#039;Reference&#039;) and not isNonEmpty(sectionOverride) then&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		return &#039;&#039;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	end&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	return contentType&lt;/ins&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;end&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;end&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;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;/table&gt;</summary>
		<author><name>Sythan</name></author>
	</entry>
	<entry>
		<id>https://edfieldmanual.com/index.php?title=Module:PageContext&amp;diff=2110&amp;oldid=prev</id>
		<title>Sythan: Resolve article eyebrow primary section and optional content type</title>
		<link rel="alternate" type="text/html" href="https://edfieldmanual.com/index.php?title=Module:PageContext&amp;diff=2110&amp;oldid=prev"/>
		<updated>2026-08-24T21:39:14Z</updated>

		<summary type="html">&lt;p&gt;Resolve article eyebrow primary section and optional content type&lt;/p&gt;
&lt;a href=&quot;https://edfieldmanual.com/index.php?title=Module:PageContext&amp;amp;diff=2110&amp;amp;oldid=1864&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Sythan</name></author>
	</entry>
	<entry>
		<id>https://edfieldmanual.com/index.php?title=Module:PageContext&amp;diff=1864&amp;oldid=prev</id>
		<title>Sythan: Create centralized page context resolver for article eyebrows</title>
		<link rel="alternate" type="text/html" href="https://edfieldmanual.com/index.php?title=Module:PageContext&amp;diff=1864&amp;oldid=prev"/>
		<updated>2026-08-24T21:16:54Z</updated>

		<summary type="html">&lt;p&gt;Create centralized page context resolver for article eyebrows&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Module:PageContext&lt;br /&gt;
-- Centralized EDFM page section resolver for Article header eyebrows.&lt;br /&gt;
-- Keep page-specific overrides small; prefer structured datasets and family rules.&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
local config = mw.loadData(&amp;#039;Module:Data/PageSections&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local cache = {}&lt;br /&gt;
&lt;br /&gt;
local function trim(value)&lt;br /&gt;
	return mw.text.trim(tostring(value or &amp;#039;&amp;#039;))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function isNonEmpty(value)&lt;br /&gt;
	return value ~= nil and trim(value) ~= &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function normalizeTitle(pageName)&lt;br /&gt;
	if isNonEmpty(pageName) then&lt;br /&gt;
		local t = mw.title.new(trim(pageName))&lt;br /&gt;
		return t and t.text or trim(pageName)&lt;br /&gt;
	end&lt;br /&gt;
	return mw.title.getCurrentTitle().text&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function loadLuaData(title)&lt;br /&gt;
	local ok, data = pcall(mw.loadData, title)&lt;br /&gt;
	if ok and type(data) == &amp;#039;table&amp;#039; then return data end&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function loadJsonPage(titleText)&lt;br /&gt;
	local title = mw.title.new(titleText)&lt;br /&gt;
	local content = title and title:getContent()&lt;br /&gt;
	if not content then return nil end&lt;br /&gt;
	local ok, data = pcall(mw.text.jsonDecode, content)&lt;br /&gt;
	if ok and type(data) == &amp;#039;table&amp;#039; then return data end&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function listContains(list, title)&lt;br /&gt;
	if type(list) ~= &amp;#039;table&amp;#039; then return false end&lt;br /&gt;
	for _, value in ipairs(list) do&lt;br /&gt;
		if value == title then return true end&lt;br /&gt;
	end&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function pageInEngineers(title)&lt;br /&gt;
	local index = loadJsonPage(&amp;#039;Module:Data/Engineers/index&amp;#039;)&lt;br /&gt;
	return listContains(index, title)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function pageInShipModules(title)&lt;br /&gt;
	local index = loadLuaData(&amp;#039;Module:Data/ShipModules/index&amp;#039;)&lt;br /&gt;
	return listContains(index, title)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function pageInModulesJson(title)&lt;br /&gt;
	local index = loadJsonPage(&amp;#039;Module:Data/Modules/index&amp;#039;)&lt;br /&gt;
	if type(index) ~= &amp;#039;table&amp;#039; or type(index.modules) ~= &amp;#039;table&amp;#039; then return false end&lt;br /&gt;
	for _, record in pairs(index.modules) do&lt;br /&gt;
		if type(record) == &amp;#039;table&amp;#039; and (record.page == title or record.name == title) then&lt;br /&gt;
			return true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function pageInMiningDataset(title, dataTitle, field)&lt;br /&gt;
	local data = loadLuaData(dataTitle)&lt;br /&gt;
	if type(data) ~= &amp;#039;table&amp;#039; then return false end&lt;br /&gt;
	for _, record in ipairs(data) do&lt;br /&gt;
		if type(record) == &amp;#039;table&amp;#039; and (record[field or &amp;#039;page&amp;#039;] == title or record.page == title or record.label == title or record.title == title) then&lt;br /&gt;
			return true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function guardianLike(title)&lt;br /&gt;
	return title:find(&amp;#039;Guardian&amp;#039;, 1, true) ~= nil or title:find(&amp;#039;Nanite Torpedo&amp;#039;, 1, true) ~= nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function thargoidLike(title)&lt;br /&gt;
	return title:find(&amp;#039;Thargoid&amp;#039;, 1, true) ~= nil or title:find(&amp;#039;Xeno&amp;#039;, 1, true) ~= nil or title:find(&amp;#039;AX &amp;#039;, 1, true) ~= nil or title:find(&amp;#039;Caustic&amp;#039;, 1, true) ~= nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function startsWith(value, prefix)&lt;br /&gt;
	return value:sub(1, #prefix) == prefix&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function typeToSection(pageType)&lt;br /&gt;
	return config.typeToSection and config.typeToSection[pageType]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getPageTypeValue(pageName)&lt;br /&gt;
	local title = normalizeTitle(pageName)&lt;br /&gt;
	if cache[&amp;#039;type:&amp;#039; .. title] then return cache[&amp;#039;type:&amp;#039; .. title] end&lt;br /&gt;
	local pageType = nil&lt;br /&gt;
&lt;br /&gt;
	if pageInEngineers(title) then&lt;br /&gt;
		pageType = &amp;#039;engineer&amp;#039;&lt;br /&gt;
	elseif pageInMiningDataset(title, &amp;#039;Module:Data/Mining/Methods&amp;#039;) then&lt;br /&gt;
		pageType = &amp;#039;mining_method&amp;#039;&lt;br /&gt;
	elseif pageInMiningDataset(title, &amp;#039;Module:Data/Mining/Equipment&amp;#039;) then&lt;br /&gt;
		pageType = &amp;#039;mining_equipment&amp;#039;&lt;br /&gt;
	elseif pageInMiningDataset(title, &amp;#039;Module:Data/Mining/Locations&amp;#039;) then&lt;br /&gt;
		pageType = &amp;#039;mining_location&amp;#039;&lt;br /&gt;
	elseif pageInMiningDataset(title, &amp;#039;Module:Data/Mining/Commodities&amp;#039;) then&lt;br /&gt;
		pageType = &amp;#039;mining_commodity&amp;#039;&lt;br /&gt;
	elseif pageInMiningDataset(title, &amp;#039;Module:Data/Procedures/Mining&amp;#039;, &amp;#039;page&amp;#039;) then&lt;br /&gt;
		pageType = &amp;#039;field_procedure&amp;#039;&lt;br /&gt;
	elseif pageInShipModules(title) or pageInModulesJson(title) then&lt;br /&gt;
		if guardianLike(title) then&lt;br /&gt;
			pageType = &amp;#039;guardian_module&amp;#039;&lt;br /&gt;
		elseif thargoidLike(title) then&lt;br /&gt;
			pageType = &amp;#039;thargoid_module&amp;#039;&lt;br /&gt;
		else&lt;br /&gt;
			pageType = &amp;#039;ship_module&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	cache[&amp;#039;type:&amp;#039; .. title] = pageType or &amp;#039;&amp;#039;&lt;br /&gt;
	return pageType&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getSectionValue(pageName, override)&lt;br /&gt;
	local title = normalizeTitle(pageName)&lt;br /&gt;
	if isNonEmpty(override) then return trim(override) end&lt;br /&gt;
	local key = &amp;#039;section:&amp;#039; .. title&lt;br /&gt;
	if cache[key] then return cache[key] end&lt;br /&gt;
&lt;br /&gt;
	local section = nil&lt;br /&gt;
	local exact = config.exactSections or {}&lt;br /&gt;
	if exact[title] then&lt;br /&gt;
		section = exact[title]&lt;br /&gt;
	else&lt;br /&gt;
		local pageType = p.getPageTypeValue(title)&lt;br /&gt;
		section = typeToSection(pageType)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not section then&lt;br /&gt;
		for _, rule in ipairs(config.familyRules or {}) do&lt;br /&gt;
			if rule.prefix and startsWith(title, rule.prefix) then&lt;br /&gt;
				section = rule.section&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not section then&lt;br /&gt;
		for _, rule in ipairs(config.titleContainsRules or {}) do&lt;br /&gt;
			if rule.text and title:find(rule.text, 1, true) then&lt;br /&gt;
				section = rule.section&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	section = section or config.fallback or &amp;#039;Reference&amp;#039;&lt;br /&gt;
	cache[key] = section&lt;br /&gt;
	return section&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getPageType(frame)&lt;br /&gt;
	local args = frame.args or {}&lt;br /&gt;
	return p.getPageTypeValue(args.page or args[1]) or &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getSection(frame)&lt;br /&gt;
	local args = frame.args or {}&lt;br /&gt;
	return p.getSectionValue(args.page or args[1], args.section or args.override)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.eyebrow(frame)&lt;br /&gt;
	local args = frame.args or {}&lt;br /&gt;
	return &amp;#039;EDFM // &amp;#039; .. p.getSectionValue(args.page or args[1], args.section or args.override)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Sythan</name></author>
	</entry>
</feed>