Template:TOC/doc
< Template:TOC
Jump to navigation
Jump to search
Revision as of 17:12, 10 June 2023 by Gwyneth Llewelyn (talk | contribs) (Adapted to conform to the SL Wiki's actual specifications for {{TOS}})
This is a documentation subpage for Template:TOC. It contains usage information, categories and other content or metadata that is not part of the original template. |
Note: This template is used on a lot of pages. In order not to put too much load on the servers, edits should be kept to a bare minimum.
Please discuss proposed changes on the talk page first.
Editing a template causes all pages that use the template to be re-rendered. If the Template is used often, this can put a lot of load on the servers since it fills up the job queue. [statistics]
Please discuss proposed changes on the talk page first.
Editing a template causes all pages that use the template to be re-rendered. If the Template is used often, this can put a lot of load on the servers since it fills up the job queue. [statistics]
{{TOC}} Flexible meta-template to allow better placement of the Table of Contents.
Usage
It should only be used in cases where the TOC gets in the way of other content or is detrimental to the layout of the page; it should not simply be used for aesthetics since it tampers with the standard appearance of articles. See Floating the TOC for further guidelines.
TemplateData
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Click here to see a monthly parameter usage report for this template based on this TemplateData.
TemplateData for TOC
{
"params": {
"float": {
"label": "Float",
"description": "Floats the TOC either to the left (default) or right",
"type": "string"
},
"style": {
"label": "Style",
"description": "<div> style attribute",
"type": "string"
},
"depth": {
"label": "Depth",
"description": "Limits the depth of subheadings shown. For instance, using depth=4 will hide the fourth level and deeper subheadings in the hierarchy. And depth=2 will hide all subheadings leaving only the main headings. This works by hiding the lower levels with CSS. Valid values are 1 to 6.",
"type": "number"
},
"class": {
"label": "Class",
"description": "<div> class attribute",
"type": "string"
}
},
"description": "{{TOC}} allows the auto-generated \"Table of Contents\" for an article to be formatted/styled according to a few parameters.",
"paramOrder": [
"float",
"style",
"depth",
"class"
],
"format": "inline"
}
See also