User:RockOfVictory/CompactDocToc

From Wikipedia, the free encyclopedia

Contents

Documentation - Discussion

[edit] Documentation

{{CompactDocToc}} is a shorter alternative to {{subst:doctl}}, both commonly used on template talk pages. CompactDocToc is currently included within doctl, as well.

Since template talk pages are unique in usually having documentation and discussion, compactDocToc acts as a short placeholder at the top of the page instead of a real table of contents (TOC). Some templates (for example {{Infobox Language}}) contain a rather large amount of documentation and a large amount of discussion; moving the TOC below the documentation (using doctl or magic word __TOC__) prevents a user from having to scroll down to learn how to use the template.

[edit] Usage

  1. Add {{compactDocToc}} to the top of a template talk page.
  2. Use level one sections to separate "Documentation" from "Discussion" (this is an exception to the style guideline):
    =Documentation=
    

=Discussion=

  1. Move table of contents by adding magic word __TOC__ to your preferred location (usually right below the "Discussion" section).

[edit] Example

See Template talk:Infobox Language for a working example of this template. Here is the basic usage:

Code Result
{{RockOfVictory/CompactDocToc}} Template:RockOfVictory/CompactDocToc

[edit] See also

[edit] Discussion

Contents