Difference between revisions of "Template:Compact ToC"
Jump to navigation
Jump to search
(Update via sandbox/testcases (more flexible parameter values, {{{title}}}/{{{titlepadding}}})) |
Dmarcadmin (talk | contribs) m (113 revisions imported) |
||
| (3 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
| − | __NOTOC__<!-- | + | {{#if:{{{allowtoc|}}}||__NOTOC__}}<!-- |
| − | + | -->{{#ifeq:{{{center|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes | | |
| − | -->{{# | + | <div style="text-align:center;"><!-- |
| − | + | -->}}<!-- | |
| − | |||
| − | + | Start contents box | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | --><div id="toc" class="toc plainlinks hlist" | |
| − | + | style="{{#ifeq:{{{center|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes |margin-left:auto;margin-right:auto; | |
| − | + | | {{#ifeq:{{{right}}}|yes |clear:right;float:right;}} | |
| − | + | }} text-align:{{{align|left}}};"> | |
| − | + | <!-- | |
| − | |||
| − | |||
| − | |||
| − | + | "[name]/Contents" | |
| − | + | ||
| − | -->{{# | + | -->{{#ifeq:{{{name}}}|no | |
| − | * [[#top|Top]] }}<!-- | + | | <div id="toctitle" style="text-align:center;{{#ifeq:{{{side|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes |display:inline-block;}}"><!-- |
| + | --><span style="font-weight:bold;">{{{name|{{MediaWiki:Toc}} }}}{{#ifeq:{{{side|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes |:<!--(colon)-->}}</span><!-- | ||
| + | --></div><!-- | ||
| + | -->}} | ||
| + | <!-- | ||
| + | |||
| + | Links | ||
| + | |||
| + | --><div style="margin:auto;white-space:nowrap;{{#ifeq:{{{side|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes |display:inline-block;}}"><!-- | ||
| + | -->{{#ifeq:{{{top}}}|yes | | ||
| + | * [[#top|Top]]}}<!-- | ||
-->{{#if:{{{pre1|{{{preSec1|}}}}}} | | -->{{#if:{{{pre1|{{{preSec1|}}}}}} | | ||
* [[{{{pre1link|{{{preSec1link|#{{{pre1|{{{preSec1}}} }}} }}} }}}|{{{pre1name|{{{preSec1name|{{{pre1|{{{preSec1}}} }}} }}} }}}]] <!-- | * [[{{{pre1link|{{{preSec1link|#{{{pre1|{{{preSec1}}} }}} }}} }}}|{{{pre1name|{{{preSec1name|{{{pre1|{{{preSec1}}} }}} }}} }}}]] <!-- | ||
| Line 40: | Line 42: | ||
-->}} {{#if:{{{pre8|{{{preSec8|}}}}}} | | -->}} {{#if:{{{pre8|{{{preSec8|}}}}}} | | ||
* [[{{{pre8link|{{{preSec8link|#{{{pre8|{{{preSec8}}} }}} }}} }}}|{{{pre8name|{{{preSec8name|{{{pre8|{{{preSec8}}} }}} }}} }}}]] <!-- | * [[{{{pre8link|{{{preSec8link|#{{{pre8|{{{preSec8}}} }}} }}} }}}|{{{pre8name|{{{preSec8name|{{{pre8|{{{preSec8}}} }}} }}} }}}]] <!-- | ||
| − | -->}} {{#if:{{{prebreak|}}} |{{{prebreak}}}</ul>}} <!-- | + | -->}} {{#if:{{{prebreak|}}} |{{#ifeq:{{{prebreak|}}}|yes|<br />|{{{prebreak}}}[[Category:Pages using compact toc with deprecated syntax]]}}</ul>}} <!-- |
| − | + | -->{{#ifeq:{{{sym}}}|yes | | |
| − | * [[#!$@|!$@]] }}<!-- -->{{# | + | * [[#!$@|!$@]] }}<!-- |
| + | -->{{#ifeq:{{{num}}}|yes | | ||
* {{{0-9|[[#0–9|0–9]]}}} }}<!-- | * {{{0-9|[[#0–9|0–9]]}}} }}<!-- | ||
| − | + | -->{{#ifeq:{{{symnum}}}|yes | | |
| − | * [[#!–9|!–9]] }} | + | * [[#!–9|!–9]] }}{{#ifeq:{{{letters}}}|no|| |
| − | |||
| − | |||
* {{{a|[[#A|A]]}}} | * {{{a|[[#A|A]]}}} | ||
* {{{b|[[#B|B]]}}} | * {{{b|[[#B|B]]}}} | ||
| Line 73: | Line 74: | ||
* {{{x|[[#X|X]]}}} | * {{{x|[[#X|X]]}}} | ||
* {{{y|[[#Y|Y]]}}} | * {{{y|[[#Y|Y]]}}} | ||
| − | * {{{z|[[#Z|Z]]}}} | + | * {{{z|[[#Z|Z]]}}}}} <!-- |
| − | + | -->{{#ifeq:{{{nobreak|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes | |</ul>}}<!-- | |
| − | + | ||
| + | Custom links | ||
| − | + | -->{{#if:{{{custom1|{{{Sec1|}}}}}} | | |
| − | |||
* [[{{{custom1link|{{{Sec1link|#{{{custom1|{{{Sec1}}} }}} }}} }}}|{{{custom1name|{{{Sec1name|{{{custom1|{{{Sec1}}} }}} }}} }}}]] <!-- | * [[{{{custom1link|{{{Sec1link|#{{{custom1|{{{Sec1}}} }}} }}} }}}|{{{custom1name|{{{Sec1name|{{{custom1|{{{Sec1}}} }}} }}} }}}]] <!-- | ||
| − | + | -->}} {{#if:{{{custom2|{{{Sec2|}}}}}} | | |
* [[{{{custom2link|{{{Sec2link|#{{{custom2|{{{Sec2}}} }}} }}} }}}|{{{custom2name|{{{Sec2name|{{{custom2|{{{Sec2}}} }}} }}} }}}]] <!-- | * [[{{{custom2link|{{{Sec2link|#{{{custom2|{{{Sec2}}} }}} }}} }}}|{{{custom2name|{{{Sec2name|{{{custom2|{{{Sec2}}} }}} }}} }}}]] <!-- | ||
| − | + | -->}} {{#if:{{{custom3|{{{Sec3|}}}}}} | | |
* [[{{{custom3link|{{{Sec3link|#{{{custom3|{{{Sec3}}} }}} }}} }}}|{{{custom3name|{{{Sec3name|{{{custom3|{{{Sec3}}} }}} }}} }}}]] <!-- | * [[{{{custom3link|{{{Sec3link|#{{{custom3|{{{Sec3}}} }}} }}} }}}|{{{custom3name|{{{Sec3name|{{{custom3|{{{Sec3}}} }}} }}} }}}]] <!-- | ||
| − | + | -->}} {{#if:{{{custom4|{{{Sec4|}}}}}} | | |
* [[{{{custom4link|{{{Sec4link|#{{{custom4|{{{Sec4}}} }}} }}} }}}|{{{custom4name|{{{Sec4name|{{{custom4|{{{Sec4}}} }}} }}} }}}]] <!-- | * [[{{{custom4link|{{{Sec4link|#{{{custom4|{{{Sec4}}} }}} }}} }}}|{{{custom4name|{{{Sec4name|{{{custom4|{{{Sec4}}} }}} }}} }}}]] <!-- | ||
| − | + | -->}} {{#if:{{{custom5|{{{Sec5|}}}}}} | | |
* [[{{{custom5link|{{{Sec5link|#{{{custom5|{{{Sec5}}} }}} }}} }}}|{{{custom5name|{{{Sec5name|{{{custom5|{{{Sec5}}} }}} }}} }}}]] <!-- | * [[{{{custom5link|{{{Sec5link|#{{{custom5|{{{Sec5}}} }}} }}} }}}|{{{custom5name|{{{Sec5name|{{{custom5|{{{Sec5}}} }}} }}} }}}]] <!-- | ||
| − | + | -->}} {{#if:{{{custom6|{{{Sec6|}}}}}} | | |
* [[{{{custom6link|{{{Sec6link|#{{{custom6|{{{Sec6}}} }}} }}} }}}|{{{custom6name|{{{Sec6name|{{{custom6|{{{Sec6}}} }}} }}} }}}]] <!-- | * [[{{{custom6link|{{{Sec6link|#{{{custom6|{{{Sec6}}} }}} }}} }}}|{{{custom6name|{{{Sec6name|{{{custom6|{{{Sec6}}} }}} }}} }}}]] <!-- | ||
| − | + | -->}} {{#if:{{{custom7|{{{Sec7|}}}}}} | | |
* [[{{{custom7link|{{{Sec7link|#{{{custom7|{{{Sec7}}} }}} }}} }}}|{{{custom7name|{{{Sec7name|{{{custom7|{{{Sec7}}} }}} }}} }}}]] <!-- | * [[{{{custom7link|{{{Sec7link|#{{{custom7|{{{Sec7}}} }}} }}} }}}|{{{custom7name|{{{Sec7name|{{{custom7|{{{Sec7}}} }}} }}} }}}]] <!-- | ||
| − | + | -->}} {{#if:{{{custom8|{{{Sec8|}}}}}} | | |
* [[{{{custom8link|{{{Sec8link|#{{{custom8|{{{Sec8}}} }}} }}} }}}|{{{custom8name|{{{Sec8name|{{{custom8|{{{Sec8}}} }}} }}} }}}]] <!-- | * [[{{{custom8link|{{{Sec8link|#{{{custom8|{{{Sec8}}} }}} }}} }}}|{{{custom8name|{{{Sec8name|{{{custom8|{{{Sec8}}} }}} }}} }}}]] <!-- | ||
| − | + | -->}}<!-- | |
| − | + | "See also" etc links | |
| − | + | ||
| + | -->{{#ifeq:{{{seealso}}}|yes | | ||
* [[#See also|See also]] }}<!-- | * [[#See also|See also]] }}<!-- | ||
| − | + | -->{{#ifeq:{{{notesfirst}}}|yes | | |
* [[#Notes|Notes]] }}<!-- | * [[#Notes|Notes]] }}<!-- | ||
| − | + | -->{{#ifeq:{{{refs|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes | | |
* [[#References|References]] }}<!-- | * [[#References|References]] }}<!-- | ||
| − | + | -->{{#ifeq:{{{notes}}}|yes | | |
* [[#Notes|Notes]] }}<!-- | * [[#Notes|Notes]] }}<!-- | ||
| − | + | -->{{#ifeq:{{{further}}}|yes | | |
* [[#Further reading|Further reading]] }}<!-- | * [[#Further reading|Further reading]] }}<!-- | ||
| − | + | -->{{#ifeq:{{{extlinks}}}|yes | | |
| − | * [[#External links|External links]] }}<!-- | + | * [[#External links|External links]] <!-- |
| + | -->}} | ||
| + | <!-- --></div><!-- | ||
| − | + | End contents box | |
| − | --></div><!-- | + | --></div><!-- |
| − | + | -->{{#ifeq:{{{center|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes | | |
| − | -->{{#ifeq:{{{center|{{#ifeq:{{{1 | + | </div><!-- |
| − | |||
-->}}<noinclude> | -->}}<noinclude> | ||
| + | |||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> | ||