TOC – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (HashLink → Link/Hash) |
Lou Montana (talk | contribs) m (Fix Link/Hash → Link template) |
||
Line 34: | Line 34: | ||
** 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 | ||
*** content: subTOC content, usually a list of {{Template|Link | *** content: subTOC content, usually a list of {{Template|Link}} internal links in format:<syntaxhighlight lang="html"> | ||
* 1. {{Link | * 1. {{Link|#Title 1}} | ||
* 2. {{Link | * 2. {{Link|#Title 2}} | ||
* 3. {{Link | * 3. {{Link|#Title 3}} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* size: (Optional, default 1) size in em (e.g {{hl|.9}} for 90%) | * size: (Optional, default 1) size in em (e.g {{hl|.9}} for 90%) | ||
Line 58: | Line 58: | ||
| <pre>{{TOC|subtoc | | <pre>{{TOC|subtoc | ||
|content= | |content= | ||
* 1. {{Link | * 1. {{Link|#Title 1}} | ||
* 2. {{Link | * 2. {{Link|#Title 2}} | ||
* 3. {{Link | * 3. {{Link|#Title 3}} | ||
}}</pre> | }}</pre> | ||
| style="padding-left: 2.5em" | | | style="padding-left: 2.5em" | | ||
{{TOC|subtoc | {{TOC|subtoc | ||
|content= | |content= | ||
* 1. {{Link | * 1. {{Link|#Title 1}} | ||
* 2. {{Link | * 2. {{Link|#Title 2}} | ||
* 3. {{Link | * 3. {{Link|#Title 3}} | ||
}} | }} | ||
|- | |- | ||
Line 73: | Line 73: | ||
|title= The sub-TOC title | |title= The sub-TOC title | ||
|content= | |content= | ||
* 1. {{Link | * 1. {{Link|#Title 1}} | ||
* 2. {{Link | * 2. {{Link|#Title 2}} | ||
* 3. {{Link | * 3. {{Link|#Title 3}} | ||
}}</pre> | }}</pre> | ||
| style="padding-left: 2.5em" | | | style="padding-left: 2.5em" | | ||
Line 81: | Line 81: | ||
|title= The sub-TOC title | |title= The sub-TOC title | ||
|content= | |content= | ||
* 1. {{Link | * 1. {{Link|#Title 1}} | ||
* 2. {{Link | * 2. {{Link|#Title 2}} | ||
* 3. {{Link | * 3. {{Link|#Title 3}} | ||
}} | }} | ||
|} | |} | ||
Line 109: | Line 109: | ||
--> | --> | ||
[[Category:Templates|{{uc:{{PAGENAME}}}}]] | [[Category:Templates|{{uc:{{PAGENAME}}}}]]</noinclude> | ||
</noinclude> |
Revision as of 17:50, 9 January 2023
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:
* 1. {{Link|#Title 1}} * 2. {{Link|#Title 2}} * 3. {{Link|#Title 3}}
- 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}} }} |