Category talk:Template:Automatic category TOC/doc
Make you add topic| This is a documentation subpage for Category:Template:Automatic category TOC It contains usage information, categories and other content that is not part of the original category page. |
| This template is used on many pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
| This template uses Lua: |
E dey add one Table of Contents (TOC) to category page if di category size need am.
Di size limits be:
- <= 100 pages → no TOC
- 101–1200 pages → {{Category TOC}}
- > 1200 pages → {{Large category TOC}}
Usage
[edit source]{{Automatic category TOC}}
For category pages, {{Automatic category TOC}} fit dey put anywhere wey you want di TOC make e show.
For category header template, e better make you put am outside any <includeonly>...</includeonly> tags, so di template go dey categorised as one wey dey use dis template.
Parameters
[edit source]No parameters be needed.
But di parameters wey dey available for {{Category TOC}} fit dey supplied, and if {{Automatic category TOC}} call {{Category TOC}}, those parameters go pass go {{Category TOC}}.
So, for example, {{Automatic category TOC|align=center}} go:
- Get no effect if no TOC generate
- Align to di center if {{Category TOC}} dey use
- Get no effect if {{Large category TOC}} dey use, because {{Large category TOC}} no accept parameters
Tracking
[edit source]Each page wey dey use dis template go dey categorised inside one of three tracking categories:
- Category:Automatic category TOC generates no TOC (0)
- Category:Automatic category TOC generates standard Category TOC (0)
- Category:Automatic category TOC generates Large category TOC (0)
Templates wey transclude {{Automatic category TOC}} go dey categorised inside:
... but only if di transclusion dey outside any <noinclude>...</noinclude> tags.
Bugs
[edit source]Dis template dey use di magic word {{PAGESINCATEGORY}} to count di number of pages wey dey inside di category. Unfortunately, dis function fit give very wrong results for some categories wey get many pages added and removed.
Dis bug dey well known, and people don document am for many places since 2010, including:
For most categories, di count dey accurate enough to support dis template. But sometimes, {{PAGESINCATEGORY}} fit wrongly return zero. Dem dey track dis for:
As of 19 April 2020, e look like say dem fix dis problem with one small but clever tweak to how {{PAGESINCATEGORY}} dey call.
Di category should contain only pages wey dem label as "empty".
See also
[edit source]Template:Category TOC see also
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| align | align | no description | Unknown | optional |
| top | top | no description | Unknown | optional |
| numerals | numerals | no description | Unknown | optional |
| uppercase | uppercase | no description | Unknown | optional |
| lowercase | lowercase | no description | Unknown | optional |