TOC – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix css style)
m (Text replacement - "\{\{( *)Important( *)\|" to "{{$1Feature$2|$2important$2|")
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div class="{{#if:{{{4|}}}|ht-{{#replace:{{{4}}}| |&#32;ht-}}|ht-1 ht-2 ht-3 ht-4 ht-5 ht-6}}}}; {{#if:{{{3|}}}|toclimit-{{{3|}}}" {{#if:{{{2|}}}|style="font-size: {{{2}}}em"}}>{{#switch:{{{1|}}}
<includeonly><div class="{{#if:{{{3|}}}|toclimit-{{{3|}}}}} {{#if:{{{4|}}}|toc-nonum}}" {{#if:{{{2|}}}|style="font-size: {{{2}}}em"}}>{{#switch:{{{1|}}}
|abc=
|abc=
__NOTOC__
<div class="toc-abc">[[#A|A]][[#B|B]][[#C|C]][[#D|D]][[#E|E]][[#F|F]][[#G|G]][[#H|H]][[#I|I]][[#J|J]][[#K|K]][[#L|L]][[#M|M]][[#N|N]][[#O|O]][[#P|P]][[#Q|Q]][[#R|R]][[#S|S]][[#T|T]][[#U|U]][[#V|V]][[#W|W]][[#X|X]][[#Y|Y]][[#Z|Z]][[##|#]]</div>
<div class="toc-abc">[[#A|A]][[#B|B]][[#C|C]][[#D|D]][[#E|E]][[#F|F]][[#G|G]][[#H|H]][[#I|I]][[#J|J]][[#K|K]][[#L|L]][[#M|M]][[#N|N]][[#O|O]][[#P|P]][[#Q|Q]][[#R|R]][[#S|S]][[#T|T]][[#U|U]][[#V|V]][[#W|W]][[#X|X]][[#Y|Y]][[#Z|Z]][[##|#]]</div>
|horizontal=
|horizontal=
Line 11: Line 12:
__TOC__
__TOC__
}}</div></includeonly><noinclude>
}}</div></includeonly><noinclude>
{{Important | Only '''one''' TOC (Table of Contents) is possible per page, with the exception of the ''abc'' one.}}
{{Feature | important | Only '''one''' TOC (Table of Contents) is possible per page, with the exception of the ''abc'' one.}}


== Usage ==
== Usage ==
{{<nowiki/>TOC|'''''mode'''''|'''''size'''''|'''''limit'''''|'''''levels'''''}}
{{<nowiki/>TOC|'''''mode'''''|'''''size'''''|'''''limit'''''|'''''nonum'''''}}
* mode: (Optional, default "normal" - case-insensitive) one of:
* mode: (Optional, default "normal" - case-insensitive) one of:
** abc - a horizontal A..Z TOC (more of an ''index'')
** abc - a horizontal A..Z TOC (more of an ''index'')
Line 22: Line 23:
** side - sets the TOC to the right
** side - sets the TOC to the right
* size: (Optional, default 1) size in em (e.g <tt>.9</tt> for 90%)
* size: (Optional, default 1) size in em (e.g <tt>.9</tt> for 90%)
* limit: (Optional, default empty) sub-level limit (e.g <tt>2</tt>
* limit: (Optional, default empty) sub-level limit (e.g <tt>2</tt>)
* levels: (Optional, default empty) wanted sub-levels (e.g <tt>2 4</tt>
* nonum: (Optional, default empty) <tt>y</tt> to hide numbers


<!--
<!--

Revision as of 03:12, 7 February 2021

Only one TOC (Table of Contents) is possible per page, with the exception of the abc one.

Usage

{{TOC|mode|size|limit|nonum}}

  • mode: (Optional, default "normal" - case-insensitive) one of:
    • abc - a horizontal A..Z TOC (more of an index)
    • horizontal - a horizontal TOC, where full titles are kept
    • normal - the normal TOC - can be placed at the wanted position with this
    • none - no TOC on the page (similar to )
    • side - sets the TOC to the right
  • size: (Optional, default 1) size in em (e.g .9 for 90%)
  • limit: (Optional, default empty) sub-level limit (e.g 2)
  • nonum: (Optional, default empty) y to hide numbers