User:RockOfVictory/CompactDocToc
Appearance
{{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.
Usage
- Add
{{compactDocToc}}
to the top of a template talk page. - Use level one sections to separate "Documentation" from "Discussion" (this is an exception to the style guideline):
=Documentation=
- Move table of contents by adding magic word
__TOC__
to your preferred location (usually right below the "Discussion" section).
Example
See Template talk:Infobox Language for a working example of this template. Here is the basic usage: {