ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Template:Toc/doc: Difference between revisions

From ModEnc
Jump to navigation Jump to search
m 桂月August moved page Template:TocRight/doc to Template:Toc/doc: Replace Template:TocRight by a better one
Doc to introduce this template.
Line 1: Line 1:
;Description
This template will specify the catalogue of the page and make it float (that is, the text can surround the catalogue), specify the location of the catalogue, or make it have no text around on the left / right side.
:This template will float the article's table of contents to the right. It will also force a ToC when/where it would not normally be found.
:Use it only when needed.
;Syntax
:Type <code>{{t|tocright}}</code>


<includeonly>[[Category:General wiki templates|{{PAGENAME}}]]</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
==Parameters descriptions==
{| class="wikitable"
! Parameters !! Default values !! Optional values !! Descriptions
|-
! {{code|1}}
| {{code|left}} || {{code|left}}, {{code|right}}, {{code|center}} || The first parameter, for specifying the location of the catalogue. Please do not use {{code|center}} in general.
|-
! {{code|2}}
| (NULL) (Only if the value of parameter 1 is {{code|left}})
* {{code|right}} (Only if the value of parameter 1 is {{code|right}})
* {{code|both}} (Only if the value of parameter 1 is {{code|center}})
| {{code|right}} (Only if the value of parameter 1 is {{code|left}})
* No options (Only if the value of parameter 1 is {{code|center}} or {{code|left}})
| The second parameter, use for specifying which side of the catalogue to empty, which will make that side have no text around the catalogue. Only while the catalogue is left, you will have option {{code|right}} to clear the text on the right. In other cases, the side to be cleared will be automatically specified and cannot be customized.
|}
 
==Examples==
{{Toc/doc/example}}

Revision as of 08:27, 23 August 2021

This template will specify the catalogue of the page and make it float (that is, the text can surround the catalogue), specify the location of the catalogue, or make it have no text around on the left / right side.

Parameters descriptions

Parameters Default values Optional values Descriptions
Template:Code Template:Code Template:Code, Template:Code, Template:Code The first parameter, for specifying the location of the catalogue. Please do not use Template:Code in general.
Template:Code (NULL) (Only if the value of parameter 1 is Template:Code) Template:Code (Only if the value of parameter 1 is Template:Code) The second parameter, use for specifying which side of the catalogue to empty, which will make that side have no text around the catalogue. Only while the catalogue is left, you will have option Template:Code to clear the text on the right. In other cases, the side to be cleared will be automatically specified and cannot be customized.

Examples

Use {{Toc}} or {{Toc|left}}

Use {{Toc|center}}

Use {{Toc|right}}