Changes

Pywikibot 6.4.0
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Lua|Module:Arguments|Module:Fiction-based redirects to list entries category handler/RedirectType|Module:Italic title|Module:Sort title}}

'''Module:Fiction-based redirects to list entries category handler''' <section begin=Doc />is used on categories that contain character, element, episode or location redirects to lists (in the style of <code><nowiki>[[Category:series-name content-type redirects to lists]]</nowiki></code>), such as [[:Category:Arrow (TV series) episode redirects to lists]].

== What it does ==
The {{#ifeq: {{NAMESPACE}} | Module | module | template }} will perform the following:
* Italicize the series name in the category title.
* Add the {{tl|Redirect category}} header.
* Add a [[WP:DEFAULTSORT|DEFAULTSORT sort key]] to the category.
* Add {{tl|CatAutoTOC}} to handle the category [[WP:ToC|table of contents]].
* Place the category as a sub-category of:
** <code><nowiki>[[:Category:series-name content-type|*]]</nowiki></code> and <code><nowiki>[[Category:series-name redirects|content-type]]</nowiki></code> — if they exist.
** <code><nowiki>[[:Category:series-name|content-type]]</nowiki></code> — if not placed in of the of the above categories.
* Place the category as a sub-category of a relevant main category or a media specific one if {{para|media}} is used:
** [[:Category:Episode redirects to lists]] or a media specific one such as [[:Category:Animated series episode redirects to lists]]
** [[:Category:Fictional character redirects]] or a media specific one such as [[:Category:Television character redirects to lists]]
** [[:Category:Fictional element redirects]] or a media specific one such as [[:Category:Television element redirects to lists]]
** [[:Category:Fictional location redirects]] or a media specific one such as [[:Category:Television location redirects]].

=== Notes ===
* This templates expects that the category be named <code>Category:series-name content-type redirects to lists</code> or <code>Category:series-name content-type redirects</code> for location categories only.
** Example: [[:Category:Arrow (TV series) character redirects to lists]] and [[:Category:Arrow (TV series) location redirects]].
* The series-name should be the exact name used for the title of the series article, including disambiguation if used.
* The content-type used will be taken from the category name and be one of either "character", "element" "episode", or "location".<section end=Doc />

== Usage ==
{{Mlx|{{BASEPAGENAME}}|main}}

== Parameter list ==
<section begin=Parameters />
{| class="wikitable"
|-
! scope="col" | Parameter
! scope="col" | Explanation
|-
! scope="row" | <code>media</code>
| The type of media the fiction belongs to. Types include, but not limited to: Film, Television and Video game. If unsure, check the top level category, such as [[:Category:Fictional character redirects]], and see what sub-categories that category has.
|-
! scope="row" | {{Unbulleted list|<code>media2</code>|<code>media3</code>|<code>media4</code>}}
| Additional types of media the fiction belongs to.
|-
! scope="row" | <code>main</code>
| Use when the main series category is not written or disambiguated the same as the series article. The value will be used for the series (parent) category title. For example: [[:Category:Heroes Reborn (miniseries) episode redirects to lists]] uses {{para|main|Heroes (American TV series)}} as it doesn't have its own category.
|-
! scope="row" | <code>no_italic</code>
| Disables the italicizing of the series title.
|-
! scope="row" | <code>test</code>
| The series article name. Used in /testcases.
|}

== Tracking categories ==
* {{Category link with count|Category:Fiction redirect categories with non-existent parent categories}}<section end=Parameters />

{{Fiction-related redirects templates}}

<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Television-related modules]]
}}</includeonly>