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
Doc to introduce this template.
m debug
Line 5: Line 5:
! Parameters !! Default values !! Optional values !! Descriptions
! Parameters !! Default values !! Optional values !! Descriptions
|-
|-
! {{code|1}}
! <code>1</code>
| {{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>left</code> || <code>left</code>, <code>right</code>, <code>center</code> || The first parameter, for specifying the location of the catalogue. Please do not use <code>center</code> in general.
|-
|-
! {{code|2}}
! <code>2</code>
|  (NULL) (Only if the value of parameter 1 is {{code|left}})
|  (NULL) (Only if the value of parameter 1 is <code>left</code>)
* {{code|right}} (Only if the value of parameter 1 is {{code|right}})
* <code>right</code> (Only if the value of parameter 1 is <code>right</code>)
* {{code|both}} (Only if the value of parameter 1 is {{code|center}})
* <code>both</code> (Only if the value of parameter 1 is <code>center</code>)
| {{code|right}} (Only if the value of parameter 1 is {{code|left}})
| <code>right</code> (Only if the value of parameter 1 is <code>left</code>)
* No options (Only if the value of parameter 1 is {{code|center}} or {{code|left}})
* No options (Only if the value of parameter 1 is <code>center</code> or <code>left</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 {{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.
| 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</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==
==Examples==
{{Toc/doc/example}}
{{Toc/doc/example}}

Revision as of 08:29, 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
1 left left, right, center The first parameter, for specifying the location of the catalogue. Please do not use center in general.
2 (NULL) (Only if the value of parameter 1 is left)
  • right (Only if the value of parameter 1 is right)
  • both (Only if the value of parameter 1 is center)
right (Only if the value of parameter 1 is left)
  • No options (Only if the value of parameter 1 is center or 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 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

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

Use {{Toc|center}}

Use {{Toc|right}}