TOC – Template
| Lou Montana (talk | contribs) m (New TOC format after 1.35 → 1.39 update) | Lou Montana (talk | contribs)  m (Add Vector 2022 skin intel) | ||
| Line 19: | Line 19: | ||
| 		{{TemplateCase||[[Category:TOC template usage error]]}} | 		{{TemplateCase||[[Category:TOC template usage error]]}} | ||
| 	}} | 	}} | ||
| | | |#default= | ||
| 	__TOC__ | 	__TOC__ | ||
| }}</div></includeonly><noinclude> | }}</div></includeonly><noinclude> | ||
| Line 28: | Line 28: | ||
| * mode: (Optional, default: "normal"; case-insensitive) one of: | * mode: (Optional, default: "normal"; case-insensitive) one of: | ||
| ** abc - a horizontal A..Z TOC (more of an ''index'') | ** abc - a horizontal A..Z TOC (more of an ''index'') | ||
| ** horizontal - a horizontal TOC, where full titles are kept | ** ''horizontal'' - a horizontal TOC, where full titles are kept | ||
| ** normal - the normal TOC - can be placed at the wanted position with this | ** ''normal'' - the normal TOC - can be placed at the wanted position with this | ||
| ** none - no TOC on the page (similar to {{hl|<nowiki>__NOTOC__</nowiki>}}) | ** none - no TOC on the page (similar to {{hl|<nowiki>__NOTOC__</nowiki>}}) | ||
| ** side - sets the TOC to the right | ** ''side'' - sets the TOC to the right | ||
| ** subtoc - creates a TOC-like box. Additional parameters: | ** subtoc - creates a TOC-like box. Additional parameters: | ||
| *** title: (Optional, default empty) subTOC title | *** title: (Optional, default empty) subTOC title | ||
| Line 42: | Line 42: | ||
| * limit: (Optional, default empty) sub-level limit (e.g {{hl|2}}) | * limit: (Optional, default empty) sub-level limit (e.g {{hl|2}}) | ||
| * nonum: (Optional, default empty) {{hl|y}} to hide numbers | * nonum: (Optional, default empty) {{hl|y}} to hide numbers | ||
| {{Feature|important|{{hl|horizontal}}, {{hl|normal}} and {{hl|side}} values do not work anymore using the Vector 2022 skin.}} | |||
| {| style="width: 100%" | {| style="width: 100%" | ||
Latest revision as of 15:27, 9 April 2025
Usage
{{TOC|mode|size|limit|nonum|title=|content=}}
- mode: (Optional, default: "normal"; case-insensitive) one of:
- abc - a horizontal A..Z TOC (more of an index)
- horizontal - a horizontal TOC, where full titles are kept
- normal - the normal TOC - can be placed at the wanted position with this
- none - no TOC on the page (similar to __NOTOC__)
- side - sets the TOC to the right
- subtoc - creates a TOC-like box. Additional parameters:
- title: (Optional, default empty) subTOC title
- content: subTOC content, usually a list of {{Link}} internal links in format:
 
 
- size: (Optional, default 1) size in em (e.g .9 for 90%)
- limit: (Optional, default empty) sub-level limit (e.g 2)
- nonum: (Optional, default empty) y to hide numbers
| Code | Result | 
|---|---|
| {{TOC}} |  | 
| {{TOC|abc}} | |
| {{TOC|subtoc
|content=
* 1 {{Link|#Title 1}}
* 2 {{Link|#Title 2}}
* 3 {{Link|#Title 3}}
}} | |
| {{TOC|subtoc
|title= The sub-TOC title
|content=
* 1 {{Link|#Title 1}}
* 2 {{Link|#Title 2}}
* 3 {{Link|#Title 3}}
}} | |
| {{TOC|subtoc
|title=
|content=
* 1 {{Link|#Title 1}}
* 2 {{Link|#Title 2}}
* 3 {{Link|#Title 3}}
}} | 
