Template:Compact TOC/doc: Difference between revisions

→‎Usage: +range links
(update)
(→‎Usage: +range links)
Line 22:
''or''
<nowiki>{{</nowiki>'''CompactTOC8'''
|name=Contents
|side=yes
|center=yes
Line 39:
|notes=yes
|extlinks=yes
|a=
|a=<nowiki>[[#A|A]]</nowiki>
...
|z=
|z=<nowiki>[[#Z|Z]]</nowiki>
}}</code>
 
===Parameters===
*<code>name=Contents</code> &mdash; change the heading to an alternative name instead of "Contents", or hide it completely by entering <code>name=no</code>
*<code>side=yes</code> &mdash; put the "Contents" heading on the left side with a colon, instead of the top without one
*<code>center=yes</code> &mdash; center to ToC in the horizontal middle of the page, instead of floated left
Line 69:
 
{{CompactTOC8|side=yes|j=J|q=Q}}
 
With a little more work, one can create range links:
 
{{tlx|CompactTOC8|side&#61;yes|x&#61;<nowiki>[[#X-Z|X-Z]]</nowiki>|y&#61;|z&#61;}} (or <code>x=|y=|z=<nowiki>[[#X-Z|X-Z]]</nowiki></code> etc.)
{{CompactTOC8|side=yes|x=[[#X-Z|X-Z]]|y=|z=}}
 
====Shorthand====
Anonymous user