<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.coigame.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AHatnote%2Fdoc</id>
	<title>Module:Hatnote/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.coigame.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AHatnote%2Fdoc"/>
	<link rel="alternate" type="text/html" href="http://wiki.coigame.com/index.php?title=Module:Hatnote/doc&amp;action=history"/>
	<updated>2026-04-22T09:24:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>http://wiki.coigame.com/index.php?title=Module:Hatnote/doc&amp;diff=2565&amp;oldid=prev</id>
		<title>Thadius856: Creation</title>
		<link rel="alternate" type="text/html" href="http://wiki.coigame.com/index.php?title=Module:Hatnote/doc&amp;diff=2565&amp;oldid=prev"/>
		<updated>2022-01-22T11:54:42Z</updated>

		<summary type="html">&lt;p&gt;Creation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is a meta-module that provides various functions for making [[Wikipedia:Hatnote|hatnotes]]. It implements the {{tl|hatnote}} template, for use in hatnotes at the top of pages, and the {{tl|format link}} template, which is used to format a wikilink for use in hatnotes. It also contains a number of helper functions for use in other Lua hatnote modules.&lt;br /&gt;
&lt;br /&gt;
== Use from wikitext ==&lt;br /&gt;
The functions in this module cannot be used directly from #invoke, and must be used through templates instead. Please see [[Wikipedia:Template:Hatnote]] and [[Wikipedia:Template:Format link]] for documentation.&lt;br /&gt;
&lt;br /&gt;
== Use from other Lua modules ==&lt;br /&gt;
To load this module from another Lua module, use the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;local mHatnote = require(&amp;#039;Module:Hatnote&amp;#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then use the functions as documented below.&lt;br /&gt;
&lt;br /&gt;
=== Hatnote ===&lt;br /&gt;
&amp;lt;code&amp;gt;mHatnote._hatnote(s, options)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Formats the string &amp;lt;var&amp;gt;s&amp;lt;/var&amp;gt; as a hatnote. This encloses &amp;lt;var&amp;gt;s&amp;lt;/var&amp;gt; in the tags &amp;amp;lt;div class=&amp;quot;hatnote&amp;quot;&amp;amp;gt;. Options are provided in the &amp;lt;var&amp;gt;options&amp;lt;/var&amp;gt; table. Options include:&lt;br /&gt;
* &amp;lt;var&amp;gt;options.extraclasses&amp;lt;/var&amp;gt; - a string of extra classes to provide&lt;br /&gt;
* &amp;lt;var&amp;gt;options.selfref&amp;lt;/var&amp;gt; - if this is not nil or false, adds the class &amp;quot;selfref&amp;quot;, used to denote self-references to Wikipedia (see [[Wikipedia:Template:Selfref]]))&lt;br /&gt;
The CSS of the hatnote class is defined in [[Module:Hatnote/styles.css]].&lt;br /&gt;
&lt;br /&gt;
; Example 1&lt;br /&gt;
&amp;lt;code&amp;gt;mHatnote._hatnote(&amp;#039;This is a hatnote.&amp;#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
&amp;amp;lt;div class=&amp;quot;hatnote&amp;quot;&amp;amp;gt;This is a hatnote.&amp;amp;lt;/div&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
Displays as:&lt;br /&gt;
{{hatnote|This is a hatnote.}}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Wikipedia:Module:Hatnote]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&amp;lt;!-- Categories go here and interwikis go in Wikidata. --&amp;gt;&lt;br /&gt;
[[Category:Hatnote modules| ]]&lt;br /&gt;
[[Category:Modules that add a tracking category]]&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Thadius856</name></author>
	</entry>
</feed>