Difference between revisions of "Template:TOC right/doc"

From Second Life Wiki
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]])-->
<!--{{High-use| 34448 }}-->
{{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>&#123;&#123;{{BASEPAGENAME}}&#125;&#125;</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>&#123;&#123;{{BASEPAGENAME}}&#125;&#125;</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>-->
<templatedata>
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
{
{
Line 58: Line 57:
}
}
</syntaxhighlight>
</syntaxhighlight>
<!--</templatedata>-->
</templatedata>-->


==Note==
==Note==
Unlike Wikipedia, which uses [https://www.mediawiki.org/wiki/Extension:TemplateStyles TemplateStyles], the SL Wiki already included a reasonably good 'hacked' {{Lts|TOC}} template, and this only redirects it (probably badly).<ref>Still a work in progress, mind you — {{u|Gwyneth Llewelyn}}</ref>
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


{{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 "Wikipedia logo"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


  1. Still a work in progress, mind you — Gwyneth Llewelyn