This template displays a floating table of contents at the place it’s used. It’s similar to {{TOC right}} and {{TOC left}}, but it contains the floating side in a parameter rather than in the template name, and works on pages translated using the Translate extension into right-to-left languages as probably intended, that is, it floats to the opposite side than the one specified in parameter. This means that if the parameter is for example “right”, it will float to the “far end” of the page: to the right on pages with left-to-right script and to the left on pages with right-to-left script. Thus it’s mainly useful on pages using the Translate extension, but nothing stops one from using it on any other page.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
floating side1

Side to float to on left-to-right pages; “right” or “left”. On right-to-left pages, the TOC is floated to the opposite side.

Suggested values
left right
Default
right
Lineoptional
clearclear

Whether to add clearing, i.e. force the TOC to appear below any other elements floated to the same side

Default
1
Booleanoptional