|
|
| Line 7: |
Line 7: |
|
| |
|
|
| |
|
| ----
| |
| {{Intricate template}}
| |
| ==Purpose==
| |
| This Table of Contents replacement for alphabetical lists provides all the features of [[Template:CompactTOC7]], plus ones from [[Template:CompactTOC2]], etc. that #7 doesn't have (the "Top" "0-9" sections, optionally), ''and'' allows you to select what other sections you want. Even the centering is optional, and you can have the "Contents" heading on the top (default) or the side.
| |
|
| |
|
| ==Usage==
| | {{template doc}} |
| | | <!--Categories and transwikis go in /doc --> |
| '''Typical''':
| |
| | |
| <code><nowiki>{{</nowiki>'''CompactTOC8'''|symnum=yes<nowiki>}}</nowiki></code>
| |
| | |
| | |
| '''For alphabetical only''' (no number or symbol entries):
| |
| | |
| <code><nowiki>{{</nowiki>'''CompactTOC8'''<nowiki>}}</nowiki></code> | |
| | |
| | |
| '''For maximum number of features and centered placement''' (leave off a parameter or change it to blank or "no" to disable a feature'''
| |
| | |
| <code><nowiki>{{</nowiki>'''CompactTOC8'''|side=yes|center=yes|right=|nobreak=yes|top=yes|num=yes|sym=yes|symnum=|seealso=yes|refs=yes|notes=yes|extlinks=yes<nowiki>}}</nowiki></code>
| |
| | |
| ''or''
| |
| | |
| <code><nowiki>{{</nowiki>'''CompactTOC8'''<br />|side=yes<br />|center=yes<br />|right=<br />|nobreak=yes<br />|top=yes<br />|num=yes<br />|sym=yes<br />|symnum=<br />|seealso=yes<br />|refs=yes<br />|notes=yes<br />|extlinks=yes
| |
| <br /><nowiki>}}</nowiki></code>
| |
| | |
| ===Parameters===
| |
| *<code>side=yes</code> — put the "Contents" heading on the left side with a colon, instead of the top without one
| |
| *<code>center=yes</code> — center to ToC in the horizontal middle of the page, instead of floated left
| |
| *<code>right=yes</code> — align the ToC horizontally to the right of the page (may require <code><nowiki><br style="clear:right;" /></nowiki></code> after it, depending on page layout), instead of floated left (this parameter is mutually exclusive with the "center" option above, and should be used sparingly and with good reason)
| |
| *<code>nobreak=yes</code> — no linebreak between the A-B-C-etc. stuff and the See also/References/etc. stuff (note: does not affect the heading; use <code>side=</code> for that)
| |
| *<code>top=yes</code> — enable the "Top" link; this is only useful if this copy of the ToC is at the bottom (or middle, theoretically) of the page, as a secondary ToC (every rendered page has a hidden <code><nowiki><a name="top" id="top"></a></nowiki></code> above the sitenotice which makes this link work without having to do anything but enable it in the template)
| |
| *<code>sym=yes</code> — enable the "!$@" link for symbolic entries section
| |
| *<code>num=yes</code> — enable the "0–9" link for numeric entries section (note that it is "–", the en-dash, not "-", the hyphen-minus at upper right of most keyboards)
| |
| *<code>symnum=yes</code> — enable the "!–9" link for combined symbolic and numeric entries section (note that it is "–" not "-", and that the preceding two options are mutually exclusive with this one)
| |
| *<code>seealso=yes</code> — enable link to the "See also" section
| |
| *<code>refs=yes</code> — enable link to the "References" section (note that it is plural)
| |
| *<code>notes=yes</code> — enable link to the "Notes" section (note that it is plural)
| |
| *<code>extlinks=yes</code> — enable link to the "External links" section
| |
| | |
| ===Examples===
| |
| {{tlx|CompactTOC8|top=yes}}
| |
| {{CompactTOC8|top=yes}}
| |
| | |
| | |
| | |
| {{tlx|CompactTOC8|center=yes|top=yes|seealso=yes}}
| |
| {{CompactTOC8|center=yes|top=yes|seealso=yes|notes=yes}}
| |
| | |
| | |
| | |
| {{tlx|CompactTOC8|side=yes|sym=yes|num=yes|refs=yes}}
| |
| {{CompactTOC8|side=yes|sym=yes|num=yes|refs=yes}}
| |
| | |
| | |
| | |
| {{tlx|CompactTOC8|top=no|refs=yes|notes=yes|extlinks=yes}}
| |
| {{CompactTOC8|top=no|refs=yes|notes=yes|extlinks=yes}}
| |
| | |
| | |
| | |
| {{tlx|CompactTOC8|side=yes|right=yes|symnum=yes|seealso=yes}}
| |
| {{CompactTOC8|side=yes|right=yes|symnum=yes|seealso=yes}}<br style="clear:right;" />
| |
| | |
| | |
| | |
| <code><nowiki>{{</nowiki>'''CompactTOC8'''<nowiki>|side=yes|center=yes|nobreak=yes|top=yes|num=yes|sym=yes|seealso=yes|refs=yes|notes=yes|extlinks=yes}}</nowiki></code>
| |
| {{CompactTOC8|side=yes|center=yes|nobreak=yes|top=yes|num=yes|sym=yes|seealso=yes|refs=yes|notes=yes|extlinks=yes}}
| |
| | |
| | |
| [[Category:TOC templates]]
| |
| [[Category:Templates using ParserFunctions]]
| |
| </noinclude> | | </noinclude> |