Difference between revisions of "Template:Compact ToC"

From DMARC Wiki
Jump to navigation Jump to search
m (Twiddle.)
m (113 revisions imported)
 
(108 intermediate revisions by 35 users not shown)
Line 1: Line 1:
{| id="toc" class="toc" summary="Contents" {{#ifeq:{{{center|}}}|yes|align="center"|}}
+
{{#if:{{{allowtoc|}}}||__NOTOC__}}<!--
! {{MediaWiki:Toc}}:
+
-->{{#ifeq:{{{center|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes |
|
+
<div style="text-align:center;"><!--
|{{#ifeq:{{{top|}}}|yes|[[#top{{!}}Top]]&nbsp;|}}{{#ifeq:{{{center|}}}|yes|[[#0–9|0–9]]&nbsp;|}}[[#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]] <br />
+
-->}}<!--
<div style="text-align:center;">{{#ifeq:{{{seealso|}}}|yes|[[#See also{{!}}&nbsp;&nbsp;&nbsp;See also&nbsp;&nbsp;&nbsp;]]|}} {{#ifeq:{{{refs|}}}|yes|[[#References{{!}}&nbsp;&nbsp;&nbsp;References&nbsp;&nbsp;&nbsp;]]|}} {{#ifeq:{{{notes|}}}|yes|[[#Notes{{!}}&nbsp;&nbsp;&nbsp;Notes&nbsp;&nbsp;&nbsp;]]|}} {{#ifeq:{{{extlinks|}}}|yes|[[#External links{{!}}&nbsp;&nbsp;&nbsp;External links&nbsp;&nbsp;&nbsp;]]|}}</div>
 
|}__NOTOC__<noinclude>
 
  
 +
Start contents box
  
----
+
--><div id="toc" class="toc plainlinks hlist"
{{Esoteric}}
+
        style="{{#ifeq:{{{center|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes |margin-left:auto;margin-right:auto;
==Purpose==
+
                | {{#ifeq:{{{right}}}|yes |clear:right;float:right;}}
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.
+
                }} text-align:{{{align|left}}};">
 +
<!--
  
==Usage==
+
"[name]/Contents"
{{tlx|CompactTOC8|center=yes|top=yes|num=yes|seealso=yes|refs=yes|extlinks=yes}} for all features (leave off or change to "no" to disable a feature}}
 
  
===Examples===
+
    -->{{#ifeq:{{{name}}}|no |
{{tlx|CompactTOC8|top&#61;yes}}
+
        |  <div id="toctitle" style="text-align:center;{{#ifeq:{{{side|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes |display:inline-block;}}"><!--
{{CompactTOC8|top=yes}}
+
              --><span style="font-weight:bold;">{{{name|{{MediaWiki:Toc}}&nbsp;}}}{{#ifeq:{{{side|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes |&#58;<!--(colon)-->}}</span><!--
 +
          --></div><!--
 +
    -->}}
 +
<!--
  
{{tlx|CompactTOC8|center&#61;yes|top&#61;yes|seealso&#61;yes}}
+
Links
{{CompactTOC8|center=yes|top=yes|seealso=yes}}
 
  
{{tlx|CompactTOC8|num&#61;yes|refs&#61;yes|extlinks&#61;yes}}
+
    --><div style="margin:auto;white-space:nowrap;{{#ifeq:{{{side|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes |display:inline-block;}}"><!--
{{CompactTOC8|num=yes|refs=yes|extlinks=yes}}
+
            -->{{#ifeq:{{{top}}}|yes |
 +
* [[#top|Top]]}}<!--
 +
            -->{{#if:{{{pre1|{{{preSec1|}}}}}} |
 +
* [[{{{pre1link|{{{preSec1link|#{{{pre1|{{{preSec1}}} }}} }}} }}}|{{{pre1name|{{{preSec1name|{{{pre1|{{{preSec1}}} }}} }}} }}}]] <!--
 +
            -->}} {{#if:{{{pre2|{{{preSec2|}}}}}} |
 +
* [[{{{pre2link|{{{preSec2link|#{{{pre2|{{{preSec2}}} }}} }}} }}}|{{{pre2name|{{{preSec2name|{{{pre2|{{{preSec2}}} }}} }}} }}}]] <!--
 +
              -->}} {{#if:{{{pre3|{{{preSec3|}}}}}} |
 +
* [[{{{pre3link|{{{preSec3link|#{{{pre3|{{{preSec3}}} }}} }}} }}}|{{{pre3name|{{{preSec3name|{{{pre3|{{{preSec3}}} }}} }}} }}}]] <!--
 +
                  -->}} {{#if:{{{pre4|{{{preSec4|}}}}}} |
 +
* [[{{{pre4link|{{{preSec4link|#{{{pre4|{{{preSec4}}} }}} }}} }}}|{{{pre4name|{{{preSec4name|{{{pre4|{{{preSec4}}} }}} }}} }}}]] <!--
 +
                    -->}} {{#if:{{{pre5|{{{preSec5|}}}}}} |
 +
* [[{{{pre5link|{{{preSec5link|#{{{pre5|{{{preSec5}}} }}} }}} }}}|{{{pre5name|{{{preSec5name|{{{pre5|{{{preSec5}}} }}} }}} }}}]] <!--
 +
                        -->}} {{#if:{{{pre6|{{{preSec6|}}}}}} |
 +
* [[{{{pre6link|{{{preSec6link|#{{{pre6|{{{preSec6}}} }}} }}} }}}|{{{pre6name|{{{preSec6name|{{{pre6|{{{preSec6}}} }}} }}} }}}]] <!--
 +
                          -->}} {{#if:{{{pre7|{{{preSec7|}}}}}} |
 +
* [[{{{pre7link|{{{preSec7link|#{{{pre7|{{{preSec7}}} }}} }}} }}}|{{{pre7name|{{{preSec7name|{{{pre7|{{{preSec7}}} }}} }}} }}}]] <!--
 +
                              -->}} {{#if:{{{pre8|{{{preSec8|}}}}}} |
 +
* [[{{{pre8link|{{{preSec8link|#{{{pre8|{{{preSec8}}} }}} }}} }}}|{{{pre8name|{{{preSec8name|{{{pre8|{{{preSec8}}} }}} }}} }}}]] <!--
 +
                                -->}} {{#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]]}}} }}<!--
 +
-->{{#ifeq:{{{symnum}}}|yes |
 +
* [[#!–9|!–9]] }}{{#ifeq:{{{letters}}}|no||
 +
* {{{a|[[#A|A]]}}}
 +
* {{{b|[[#B|B]]}}}
 +
* {{{c|[[#C|C]]}}}
 +
* {{{d|[[#D|D]]}}}
 +
* {{{e|[[#E|E]]}}}
 +
* {{{f|[[#F|F]]}}}
 +
* {{{g|[[#G|G]]}}}
 +
* {{{h|[[#H|H]]}}}
 +
* {{{i|[[#I|I]]}}}
 +
* {{{j|[[#J|J]]}}}
 +
* {{{k|[[#K|K]]}}}
 +
* {{{l|[[#L|L]]}}}
 +
* {{{m|[[#M|M]]}}}
 +
* {{{n|[[#N|N]]}}}
 +
* {{{o|[[#O|O]]}}}
 +
* {{{p|[[#P|P]]}}}
 +
* {{{q|[[#Q|Q]]}}}
 +
* {{{r|[[#R|R]]}}}
 +
* {{{s|[[#S|S]]}}}
 +
* {{{t|[[#T|T]]}}}
 +
* {{{u|[[#U|U]]}}}
 +
* {{{v|[[#V|V]]}}}
 +
* {{{w|[[#W|W]]}}}
 +
* {{{x|[[#X|X]]}}}
 +
* {{{y|[[#Y|Y]]}}}
 +
* {{{z|[[#Z|Z]]}}}}} <!--
 +
-->{{#ifeq:{{{nobreak|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes | |</ul>}}<!--
  
{{tlx|CompactTOC8|top&#61;no|refs&#61;yes|extlinks&#61;yes}}
+
Custom links
{{CompactTOC8|top=no|refs=yes|extlinks=yes}}
 
  
{{tlx|CompactTOC8|center&#61;yes|top&#61;yes|num&#61;yes|seealso&#61;yes|refs&#61;yes|extlinks&#61;yes}}
+
-->{{#if:{{{custom1|{{{Sec1|}}}}}} |
{{CompactTOC8|center=yes|top=yes|num=yes|seealso=yes|refs=yes|extlinks=yes}}
+
* [[{{{custom1link|{{{Sec1link|#{{{custom1|{{{Sec1}}} }}} }}} }}}|{{{custom1name|{{{Sec1name|{{{custom1|{{{Sec1}}} }}} }}} }}}]] <!--
 +
-->}} {{#if:{{{custom2|{{{Sec2|}}}}}} |
 +
* [[{{{custom2link|{{{Sec2link|#{{{custom2|{{{Sec2}}} }}} }}} }}}|{{{custom2name|{{{Sec2name|{{{custom2|{{{Sec2}}} }}} }}} }}}]] <!--
 +
  -->}} {{#if:{{{custom3|{{{Sec3|}}}}}} |
 +
* [[{{{custom3link|{{{Sec3link|#{{{custom3|{{{Sec3}}} }}} }}} }}}|{{{custom3name|{{{Sec3name|{{{custom3|{{{Sec3}}} }}} }}} }}}]] <!--
 +
      -->}} {{#if:{{{custom4|{{{Sec4|}}}}}} |
 +
* [[{{{custom4link|{{{Sec4link|#{{{custom4|{{{Sec4}}} }}} }}} }}}|{{{custom4name|{{{Sec4name|{{{custom4|{{{Sec4}}} }}} }}} }}}]] <!--
 +
        -->}} {{#if:{{{custom5|{{{Sec5|}}}}}} |
 +
* [[{{{custom5link|{{{Sec5link|#{{{custom5|{{{Sec5}}} }}} }}} }}}|{{{custom5name|{{{Sec5name|{{{custom5|{{{Sec5}}} }}} }}} }}}]] <!--
 +
            -->}} {{#if:{{{custom6|{{{Sec6|}}}}}} |
 +
* [[{{{custom6link|{{{Sec6link|#{{{custom6|{{{Sec6}}} }}} }}} }}}|{{{custom6name|{{{Sec6name|{{{custom6|{{{Sec6}}} }}} }}} }}}]] <!--
 +
              -->}} {{#if:{{{custom7|{{{Sec7|}}}}}} |
 +
* [[{{{custom7link|{{{Sec7link|#{{{custom7|{{{Sec7}}} }}} }}} }}}|{{{custom7name|{{{Sec7name|{{{custom7|{{{Sec7}}} }}} }}} }}}]] <!--
 +
                  -->}} {{#if:{{{custom8|{{{Sec8|}}}}}} |
 +
* [[{{{custom8link|{{{Sec8link|#{{{custom8|{{{Sec8}}} }}} }}} }}}|{{{custom8name|{{{Sec8name|{{{custom8|{{{Sec8}}} }}} }}} }}}]] <!--
 +
                    -->}}<!--
  
[[Category:TOC templates|{{PAGENAME}}]]
+
"See also" etc links
[[Category:Templates using parser functions|{{PAGENAME}}]]
+
 
 +
-->{{#ifeq:{{{seealso}}}|yes |
 +
* [[#See also|See also]] }}<!--
 +
-->{{#ifeq:{{{notesfirst}}}|yes |
 +
* [[#Notes|Notes]] }}<!--
 +
-->{{#ifeq:{{{refs|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes |
 +
* [[#References|References]] }}<!--
 +
-->{{#ifeq:{{{notes}}}|yes |
 +
* [[#Notes|Notes]] }}<!--
 +
-->{{#ifeq:{{{further}}}|yes |
 +
* [[#Further reading|Further reading]] }}<!--
 +
-->{{#ifeq:{{{extlinks}}}|yes |
 +
* [[#External links|External links]] <!--
 +
-->}}
 +
<!-- --></div><!--
 +
 
 +
End contents box
 +
 
 +
--></div><!--
 +
 
 +
-->{{#ifeq:{{{center|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes |
 +
</div><!--
 +
-->}}<noinclude>
 +
 
 +
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 02:44, 17 July 2015

{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}