Template:TOC top/doc
From WikiMD's Wellness Encyclopedia
This is a documentation subpage for Template:TOC top. It may contain usage information, categories and other content that is not part of the original template page. |
This template is used on approximately 78,000 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 TemplateStyles: |
This is used to create custom table of contents templates such as {{Category TOC}}. It replaces and suppresses the ToC that the wiki software would automatically generate.
Usage[edit source]
Please note that this is solely for ease of maintaining existing templates. Please do not use this to write new templates: instead, browse through Category:Wikipedia table of contents templates and use an existing template. This code is one of the final pieces in cleaning up years of redundant and overlapping code in this area.
Parameters (optional)[edit source]
- title
- The title to use for this ToC element. The default is Contents.
- align
- Sets the CSS float and clear properties, which forces this float underneath the side specified with this attribute. So,
align=right
will place the element after all the right floating elements before it. Options areleft
,right
,center
, ornone
(default).
- clear
- Overrides the default CSS clear property set by the align parameter, which is not typically needed. Options are
left
,right
,both
, ornone
. The defaults areleft
when|align=left
,right
when|align=right
,none
when|align=center
, andleft
when|align=none
. Use|clear=none
to allow other floating elements to float next to the table of contents, and|clear=both
to force the table of contents to have nothing next to it.
- primary
- Set this to
false
if this ToC is not used as the primary ToC of a page. This makes sure that the title of this ToC does not show up in the primary ToC. A side effect of this is the disappearing of the show/hide toggle.
TemplateData[edit source]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:TOC top in articles based on its TemplateData.
TemplateData for TOC top
Unexpected property "params.align.suggestedvalues".
See also[edit source]
- {{TOC bottom}}