<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.agency/index.php?action=history&amp;feed=atom&amp;title=Module%3ATemplate_parameter_value</id>
		<title>Module:Template parameter value - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.agency/index.php?action=history&amp;feed=atom&amp;title=Module%3ATemplate_parameter_value"/>
		<link rel="alternate" type="text/html" href="https://wiki.agency/index.php?title=Module:Template_parameter_value&amp;action=history"/>
		<updated>2026-05-04T00:03:29Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.1</generator>

	<entry>
		<id>https://wiki.agency/index.php?title=Module:Template_parameter_value&amp;diff=4592&amp;oldid=prev</id>
		<title>Admin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.agency/index.php?title=Module:Template_parameter_value&amp;diff=4592&amp;oldid=prev"/>
				<updated>2018-11-02T21:30:51Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:30, 2 November 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>https://wiki.agency/index.php?title=Module:Template_parameter_value&amp;diff=4591&amp;oldid=prev</id>
		<title>AlexTheWhovian: If content nil</title>
		<link rel="alternate" type="text/html" href="https://wiki.agency/index.php?title=Module:Template_parameter_value&amp;diff=4591&amp;oldid=prev"/>
				<updated>2018-09-27T13:09:00Z</updated>
		
		<summary type="html">&lt;p&gt;If content nil&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
function trimspaces(s)&lt;br /&gt;
	return string.gsub(s, &amp;quot;^%s*(.-)%s*$&amp;quot;, &amp;quot;%1&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getTitle(title)&lt;br /&gt;
	local success, titleObj = pcall(mw.title.new, title)&lt;br /&gt;
	if success then return titleObj&lt;br /&gt;
	else return nil end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = require(&amp;#039;Module:Arguments&amp;#039;).getArgs(frame, {&lt;br /&gt;
		wrappers = &amp;#039;Template:Template parameter value&amp;#039;&lt;br /&gt;
	})&lt;br /&gt;
	&lt;br /&gt;
	local template = args[2]&lt;br /&gt;
	local parameter = args[4]&lt;br /&gt;
	local numberedParameter = (tonumber(parameter) ~= nil)&lt;br /&gt;
	&lt;br /&gt;
	local templateCount = 0&lt;br /&gt;
	local parameterCount = 0&lt;br /&gt;
	local templateMatch = tonumber(args[3] or 1)&lt;br /&gt;
	local parameterMatch = tonumber(args[5] or 1)*(numberedParameter and parameter or 1)&lt;br /&gt;
	&lt;br /&gt;
	local targettitle = getTitle(args[1])&lt;br /&gt;
	if targettitle == nil then return &amp;quot;&amp;quot; end&lt;br /&gt;
    local content = string.gsub(targettitle:getContent() or &amp;quot;&amp;quot;, &amp;quot;[\r\n]&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	while templateCount ~= templateMatch do&lt;br /&gt;
		if content == nil then return &amp;quot;&amp;quot; end&lt;br /&gt;
		content = string.match(content, &amp;#039;{{&amp;#039; .. template .. &amp;quot;(.+)&amp;quot;)&lt;br /&gt;
		templateCount = templateCount + 1&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	while parameterCount ~= parameterMatch do&lt;br /&gt;
		if content == nil then return &amp;quot;&amp;quot; end&lt;br /&gt;
		content = string.match(content, &amp;#039;|%s*&amp;#039; .. (numberedParameter and &amp;quot;&amp;quot; or parameter .. &amp;#039;%s*=%s*&amp;#039;) .. &amp;#039;(.+)&amp;#039;)&lt;br /&gt;
		parameterCount = parameterCount + 1&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if content == nil then return &amp;quot;&amp;quot; end&lt;br /&gt;
	&lt;br /&gt;
	content = string.gsub(content, &amp;quot;&amp;lt;/?%a*include%a*&amp;gt;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	content = string.match(content, &amp;#039;^([^|}]*{{[^}]+}}[^|}]*)|&amp;#039;) or string.match(content, &amp;#039;([^|}]+)&amp;#039;)&lt;br /&gt;
	content = frame:preprocess{text = content}&lt;br /&gt;
	content = trimspaces(content)&lt;br /&gt;
	&lt;br /&gt;
	return content&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>AlexTheWhovian</name></author>	</entry>

	</feed>