<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kingwarzcharts.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ASongCategories%2Fdoc</id>
	<title>Module:SongCategories/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://kingwarzcharts.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ASongCategories%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://kingwarzcharts.com/index.php?title=Module:SongCategories/doc&amp;action=history"/>
	<updated>2026-07-21T20:50:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://kingwarzcharts.com/index.php?title=Module:SongCategories/doc&amp;diff=3224&amp;oldid=prev</id>
		<title>Kingwarz at 00:24, 11 June 2025</title>
		<link rel="alternate" type="text/html" href="https://kingwarzcharts.com/index.php?title=Module:SongCategories/doc&amp;diff=3224&amp;oldid=prev"/>
		<updated>2025-06-11T00:24:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Module rating|protected}}&lt;br /&gt;
{{High-use}}&lt;br /&gt;
This module is used by the {{tl|Infobox song}} template to assign categories based on the {{para|type}} parameter. It processes the song type and adds appropriate categories to articles.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
The module is invoked within the {{tl|Infobox song}} template as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#invoke:SongCategories|getCategories|type={{{type|}}}}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module expects a &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; parameter with one of the following values:&lt;br /&gt;
* &amp;lt;code&amp;gt;Top 10 Hit Song&amp;lt;/code&amp;gt;: Adds &amp;lt;nowiki&amp;gt;[[Category:Top 10 Hit songs]]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;No.1 Hit Song&amp;lt;/code&amp;gt;: Adds &amp;lt;nowiki&amp;gt;[[Category:Number One Songs]]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;Major Hit Song&amp;lt;/code&amp;gt;: Adds &amp;lt;nowiki&amp;gt;[[Category:Major Hit Songs]]&amp;lt;/nowiki&amp;gt; and &amp;lt;nowiki&amp;gt;[[Category:Number One Songs]]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
* Any other value or empty input: No categories are added.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
In an article using the {{tl|Infobox song}} template:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{Infobox song&lt;br /&gt;
| name = Example Song&lt;br /&gt;
| type = Major Hit Song&lt;br /&gt;
| artist = Example Artist&lt;br /&gt;
| album = Example Album&lt;br /&gt;
| released = January 1, 2020&lt;br /&gt;
| genre = Pop&lt;br /&gt;
| rating = 4&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will add the article to &amp;lt;nowiki&amp;gt;[[Category:Major Hit Songs]]&amp;lt;/nowiki&amp;gt; and &amp;lt;nowiki&amp;gt;[[Category:Number One Songs]]&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* The module is case-sensitive. Ensure the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; parameter matches the exact values (&amp;lt;code&amp;gt;Top 10 Hit Song&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;No.1 Hit Song&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Major Hit Song&amp;lt;/code&amp;gt;).&lt;br /&gt;
* If you need case-insensitive matching, the module can be modified to normalize the input (e.g., convert to lowercase).&lt;br /&gt;
* Ensure the categories (&amp;lt;nowiki&amp;gt;[[Category:Top 10 Hit songs]]&amp;lt;/nowiki&amp;gt;, &amp;lt;nowiki&amp;gt;[[Category:Number One Songs]]&amp;lt;/nowiki&amp;gt;, &amp;lt;nowiki&amp;gt;[[Category:Major Hit Songs]]&amp;lt;/nowiki&amp;gt;) exist on the wiki to avoid redlinks.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* {{tl|Infobox song}} – The template that uses this module.&lt;br /&gt;
* [[Module:SongCertifications]] – Handles certification-based categories for the same template.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
[[Category:Template documentation]]&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kingwarz</name></author>
	</entry>
</feed>