<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ACat_main%2Fdoc</id>
	<title>Module:Cat main/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ACat_main%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Cat_main/doc&amp;action=history"/>
	<updated>2026-05-07T19:34:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Cat_main/doc&amp;diff=135486&amp;oldid=prev</id>
		<title>imported&gt;Thingofme: high-use</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Cat_main/doc&amp;diff=135486&amp;oldid=prev"/>
		<updated>2022-06-19T13:53:29Z</updated>

		<summary type="html">&lt;p&gt;high-use&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{high-use}}&lt;br /&gt;
This module produces hatnote saying &amp;quot;The main article for this category is x.&amp;quot; It implements the {{tl|cat main}} template.&lt;br /&gt;
&lt;br /&gt;
== Use from wikitext ==&lt;br /&gt;
&lt;br /&gt;
This module should usually be used via the {{tl|cat main}} template. However, it can also be used from #invoke with the syntax &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Cat main|catMain|&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;parameters&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Please see the {{tl|cat main}} template documentation for available parameters.&lt;br /&gt;
&lt;br /&gt;
== Use from other Lua modules ==&lt;br /&gt;
&lt;br /&gt;
Load the module:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local mCatMain = require(&amp;#039;Module:Cat main&amp;#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then use the _catMain function like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mCatMain._catMain(options, ...)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;options&amp;lt;/var&amp;gt; is an optional table that can be used to configure the function&amp;#039;s output. There are two available options, &amp;quot;article&amp;quot; and &amp;quot;selfref&amp;quot;.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;article&amp;#039;&amp;#039;&amp;#039; - if this is set to false, &amp;quot;no&amp;quot;, &amp;quot;n&amp;quot;, &amp;quot;false&amp;quot;, or 0, the module outputs &amp;quot;The main page&amp;quot; rather than &amp;quot;The main article&amp;quot;. Use the code {{code|1={article = false}|2=lua}}.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;selfref&amp;#039;&amp;#039;&amp;#039; - this is used when the output is a self-reference to Wikipedia. To set this option, use {{code|1={selfref = true}|2=lua}}. (See the {{tl|selfref}} template for more details on self-references.)&lt;br /&gt;
&lt;br /&gt;
The remaining arguments are page names to be turned into link(s) following the text &amp;quot;The main article for this category is&amp;quot;. If no page names are specified, the current page name (minus the [[WP:NS|namespace]] name) is used for the first link.&lt;br /&gt;
&lt;br /&gt;
; Example 1&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mCatMain._catMain(nil, &amp;#039;Foo&amp;#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Produces:&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;div class=&amp;quot;hatnote relarticle mainarticle&amp;quot;&amp;gt;The main article for this [[Help:Categories|category]] is &amp;#039;&amp;#039;&amp;#039;[[Foo]]&amp;#039;&amp;#039;&amp;#039;.&amp;lt;/div&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
Displays as:&lt;br /&gt;
{{cat main|Foo}}&lt;br /&gt;
&lt;br /&gt;
; Example 2&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mCatMain._catMain(nil, &amp;#039;Foo&amp;#039;, &amp;#039;Bar&amp;#039;, &amp;#039;Baz&amp;#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Produces:&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;div class=&amp;quot;hatnote relarticle mainarticle&amp;quot;&amp;gt;The main articles for this [[Help:Categories|category]] are &amp;#039;&amp;#039;&amp;#039;[[Foo]]&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;[[Bar]]&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;[[Baz]]&amp;#039;&amp;#039;&amp;#039;.&amp;lt;/div&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
Displays as:&lt;br /&gt;
{{cat main|Foo|Bar|Baz}}&lt;br /&gt;
&lt;br /&gt;
; Example 3&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mCatMain._catMain({article = false}, &amp;#039;Foo&amp;#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Produces:&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;div class=&amp;quot;hatnote relarticle mainarticle&amp;quot;&amp;gt;The main page for this [[Help:Categories|category]] is &amp;#039;&amp;#039;&amp;#039;[[Foo]]&amp;#039;&amp;#039;&amp;#039;.&amp;lt;/div&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
Displays as:&lt;br /&gt;
{{cat main|Foo|article=no}}&lt;br /&gt;
&lt;br /&gt;
== Technical details ==&lt;br /&gt;
&lt;br /&gt;
This module uses [[Module:Hatnote]] to format the hatnote text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories go here and interwikis go in Wikidata. --&amp;gt;&lt;br /&gt;
[[Category:Hatnote modules]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Thingofme</name></author>
	</entry>
</feed>