Template:ER to list entry

This is a redirect from a television related title for an episode to a list of episodes, a type of article which is a collection of brief descriptions and covers the subject more comprehensively. Links to list entries should use this redirect and should not be piped with the target pagename. This allows "what links here" to be used to identify the links to the individual sections.

Usage
Without any arguments, this template automatically categorizes pages to Category:Episode redirects to lists, a subcategory of Category:Redirects to list entries.

Please note: the first time that the TV series-specific category is used, that category should itself by categorized in Category:Episode redirects to lists by adding to the TV series-specific category page - likely, if the TV series category appears as a red link on redirection page, this step needs to be performed. Additionally, it is recommended to include Wikipedia category to the top of the TV series category page to identify the category as for Wikipedia internals and not general encyclopedic use. Due to a nuance in how templates and categories are updated, you may need to edit the redirected page twice to fully activate that category.

Series name
An optional argument may be supplied to give the name of the TV series the episode is part of; this will sort the episode in a category for that TV series. For example,   will place the episode redirection into Category:Friends episode redirects to lists.

Sorting
A second argument can be used to provide a sortable name for the episode being redirected, for example,   will list the episode "The Hive" in alphabetically order by "Hive" instead of by "The" in the categories. Without the second parameter, the template sorts on the page name, or the DEFAULTSORT.