Difference between revisions of "Template:TOC right/doc"
Jump to navigation
Jump to search
m (fixed broken user page link) |
(Cleaning up some explanations that may not be pertinent for the SL Wiki; prepared documentation to deal with *both* TOC left and right templates.) |
||
Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])--> | <!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])--> | ||
{{TOC right}} | {{TOC right}} | ||
{{tsh|tocright|TOCright}} | <!--{{tsh|tocright|TOCright}}--> | ||
{{Uses TemplateStyles|Template:TOC limit/styles.css|Template:TOC right/styles.css}} | <!--{{Uses TemplateStyles|Template:TOC limit/styles.css|Template:TOC right/styles.css}}--> | ||
{{cleanup}} | {{cleanup}} | ||
{{tl|TOC right}} forces the auto-generated Table of Contents for an article to appear floated to the right side of the page, in order to improve article layout. | {{tl|TOC right}} forces the auto-generated Table of Contents for an article to appear floated to the right side of the page, in order to improve article layout; {{tl|TOC left}} is the equivalent template to float the TOC to the left. | ||
==Usage== | ==Usage== | ||
Insert <code>{{{{BASEPAGENAME}}}}</code> at the point in the article where you want the top of the Table of Contents box to appear. This should usually be after the text of the lead section, and just before the first section heading, in accordance with {{Wikipedia|MOS:LEADELEMENTS}}. Use with {{tl|-}} or {{tl|clear}} to prevent collision with text; use the '''clear''' parameter (see below) to prevent collision with images. | * Insert <code>{{{{BASEPAGENAME}}}}</code> at the point in the article where you want the top of the Table of Contents box to appear. This should usually be after the text of the lead section, and just before the first section heading, in accordance with {{Wikipedia|MOS:LEADELEMENTS}}. Use with {{tl|-}} or {{tl|clear}} to prevent collision with text; use the '''clear''' parameter (see below) to prevent collision with images. | ||
* Avoid placing the TOC in a visually poor location. Crossing a section division is probably a poor idea. | * Avoid placing the TOC in a visually poor location. Crossing a section division is probably a poor idea. | ||
<!-- | |||
;width: Set the CSS width. | ;width: Set the CSS width. | ||
Line 27: | Line 26: | ||
{{templatedata header}} | {{templatedata header}} | ||
<templatedata> | |||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
{ | { | ||
Line 58: | Line 57: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</templatedata>--> | |||
==Note== | ==Note== | ||
Unlike Wikipedia, which uses [https://www.mediawiki.org/wiki/Extension:TemplateStyles TemplateStyles], the SL Wiki already included a reasonably good 'hacked' {{ | Unlike Wikipedia, which uses [https://www.mediawiki.org/wiki/Extension:TemplateStyles TemplateStyles], the SL Wiki already included a reasonably good 'hacked' {{Tl|TOC}} template, and {{Tl|{{BASEPAGENAME}}}} only redirects it (probably badly).<ref>Still a work in progress, mind you — {{u|Gwyneth Llewelyn}}</ref> | ||
==See also== | ==See also== | ||
* {{Lts|TOC}} | * {{Lts|TOC}} | ||
* {{Lts|TOC right}} | |||
* {{Lts|TOC left}} | * {{Lts|TOC left}} | ||
<includeonly>{{Sandbox other|| | <includeonly>{{Sandbox other|| | ||
<!-- Categories below this line, please; interwikis at Wikidata --> | <!-- Categories below this line, please; interwikis at Wikidata --> | ||
{{DEFAULTSORT:Toc Right}} | <!--{{DEFAULTSORT:Toc Right}}--><!-- Merged documentation for left and right in the same spot--> | ||
[[Category:Wikipedia table of contents templates]] | [[Category:Wikipedia table of contents templates]] | ||
}}</includeonly> | }}</includeonly> |
Latest revision as of 16:27, 10 June 2023
This is a documentation subpage for Template:TOC right. It contains usage information, categories and other content or metadata that is not part of the original template. |
This template may require cleanup to meet this wiki's Editing Guidelines. No cleanup reason has been specified. Please help improve this template if you can; the talk page may contain suggestions. |
{{TOC right}} forces the auto-generated Table of Contents for an article to appear floated to the right side of the page, in order to improve article layout; {{TOC left}} is the equivalent template to float the TOC to the left.
Usage
- Insert
{{TOC right}}
at the point in the article where you want the top of the Table of Contents box to appear. This should usually be after the text of the lead section, and just before the first section heading, in accordance with MOS:LEADELEMENTS. Use with {{-}} or {{clear}} to prevent collision with text; use the clear parameter (see below) to prevent collision with images.
- Avoid placing the TOC in a visually poor location. Crossing a section division is probably a poor idea.
Note
Unlike Wikipedia, which uses TemplateStyles, the SL Wiki already included a reasonably good 'hacked' {{TOC}} template, and {{TOC right}} only redirects it (probably badly).[1]
See also
- Template:TOC(edit talk links history)
- Template:TOC right(edit talk links history)
- Template:TOC left(edit talk links history)
- ↑ Still a work in progress, mind you — Gwyneth Llewelyn