<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://the-democratika.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ACategory_pair</id>
	<title>Module:Category pair - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://the-democratika.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ACategory_pair"/>
	<link rel="alternate" type="text/html" href="https://the-democratika.com/wiki/index.php?title=Module:Category_pair&amp;action=history"/>
	<updated>2026-04-05T09:12:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://the-democratika.com/wiki/index.php?title=Module:Category_pair&amp;diff=9707&amp;oldid=prev</id>
		<title>&gt;Legoktm: Replace Module:No globals with require( &quot;strict&quot; )</title>
		<link rel="alternate" type="text/html" href="https://the-democratika.com/wiki/index.php?title=Module:Category_pair&amp;diff=9707&amp;oldid=prev"/>
		<updated>2022-10-21T06:49:24Z</updated>

		<summary type="html">&lt;p&gt;Replace &lt;a href=&quot;/wiki/index.php?title=Module:No_globals&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Module:No globals (page does not exist)&quot;&gt;Module:No globals&lt;/a&gt; with require( &amp;quot;strict&amp;quot; )&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;#039;strict&amp;#039;)&lt;br /&gt;
local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
local hatnote = require(&amp;#039;Module:Hatnote&amp;#039;)._hatnote&lt;br /&gt;
local formatLink = require(&amp;#039;Module:Format link&amp;#039;)._formatLink&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local catNS = mw.site.namespaces.Category.id -- category namespace number&lt;br /&gt;
&lt;br /&gt;
-- Lua implementation of [[Template:CategoryPair]]&lt;br /&gt;
-- Arguments:&lt;br /&gt;
--   prevTitle -- mw.title.Title object for preceding category&lt;br /&gt;
--   nextTitle -- mw.title.Title object for succeeding category&lt;br /&gt;
-- Returns:&lt;br /&gt;
--   hatnote that says &amp;quot;see also&amp;quot; for one or both of prev/next (depending on whether they exist)&lt;br /&gt;
function p._pair(prevTitle, nextTitle)&lt;br /&gt;
	prevTitle = prevTitle and prevTitle.exists and formatLink{link = prevTitle.fullText}&lt;br /&gt;
	nextTitle = nextTitle and nextTitle.exists and formatLink{link = nextTitle.fullText}&lt;br /&gt;
	local note = &amp;#039;&amp;#039;&lt;br /&gt;
	if prevTitle and nextTitle then -- if both&lt;br /&gt;
		note = mw.ustring.format(&amp;#039;See also the preceding %s and the succeeding %s&amp;#039;,prevTitle, nextTitle)&lt;br /&gt;
	elseif prevTitle then -- if only prevTitle&lt;br /&gt;
		note = mw.ustring.format(&amp;#039;See also the preceding %s&amp;#039;, prevTitle)&lt;br /&gt;
	elseif nextTitle then -- if only nextTitle&lt;br /&gt;
		note = mw.ustring.format(&amp;#039;See also the succeeding %s&amp;#039;, nextTitle)&lt;br /&gt;
	else                  -- otherwise neither&lt;br /&gt;
		return mw.title.getCurrentTitle().namespace == catNS and &amp;#039;[[Category:Pages using category pair with no output]]&amp;#039; or &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	return hatnote(note, {extraclasses = &amp;#039;seealso&amp;#039;})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.catPair(frame)&lt;br /&gt;
	local args = getArgs(frame, {wrappers={&amp;#039;Template:Category pair&amp;#039;}})&lt;br /&gt;
	local prevTitle = args[1] and mw.title.new(args[1],catNS)&lt;br /&gt;
	local nextTitle = args[2] and mw.title.new(args[2],catNS)&lt;br /&gt;
	return p._pair(prevTitle, nextTitle)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.prevCat(frame)&lt;br /&gt;
	local args = getArgs(frame, {wrappers={&amp;#039;Template:Preceding category&amp;#039;}})&lt;br /&gt;
	local prevTitle = args[1] and mw.title.new(args[1], catNS)&lt;br /&gt;
	return p._pair(prevTitle, nil)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.nextCat(frame)&lt;br /&gt;
	local args = getArgs(frame, {wrappers={&amp;#039;Template:Succeeding category&amp;#039;}})&lt;br /&gt;
	local nextTitle = args[1] and mw.title.new(args[1], catNS)&lt;br /&gt;
	return p._pair(nil, nextTitle)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>&gt;Legoktm</name></author>
	</entry>
</feed>