Difference between revisions of "Template:Compact ToC"

From DMARC Wiki
Jump to navigation Jump to search
m (Vegaswikian moved page Template:Template:Compact ToC to Template:Compact ToC: Fix typo)
m (113 revisions imported)
 
(22 intermediate revisions by 15 users not shown)
Line 1: Line 1:
{|<!--=======================================================
+
{{#if:{{{allowtoc|}}}||__NOTOC__}}<!--
    --  Template CompactTOC8 -  (see NOTES at bottom)
+
-->{{#ifeq:{{{center|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes |
    --=======================================================
+
<div style="text-align:center;"><!--
--
+
-->}}<!--
--> id="toc" class="toc" summary="Contents" {{
 
<!-- ----------------------------------- Check center/right-->
 
#ifeq:{{{center|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|align="center"|}}{{#ifeq:{{{right|}}}|yes|align="right"|}}
 
{{      <!--see NOTE I3 below-->
 
<!-- ----------------------------------- Check name/side-->
 
#ifeq:{{{name|}}}|no||! {{{name|{{MediaWiki:Toc}}}}}{{#ifeq:{{{side|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|&#58;|}}
 
{{#ifeq:{{{side|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|{{!}}|{{!}}-}}}}
 
|{{#ifeq:{{{nobreak|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes||<div style="text-align:{{{align|left}}};">}}{{
 
<!-- --------------------------------------- Check top -->
 
#ifeq:{{{top|}}}|yes|[[#top{{!}}Top]]&nbsp;{{{sep|&nbsp;}}}|}} {{
 
<!-- --------------------------------------- Prefix headers--
 
          (see NOTE P2 below) -->
 
#if:{{{pre1|{{{preSec1|}}}}}}|[[{{{pre1link|{{{preSec1link|#{{{pre1|{{{preSec1|}}}}}}}}}}}}{{!}}{{{pre1name|{{{preSec1name|{{{pre1|{{{preSec1|}}}}}}}}}}}}]]&nbsp;{{{sep|&nbsp;}}}|}} {{
 
#if:{{{pre2|{{{preSec2|}}}}}}|[[{{{pre2link|{{{preSec2link|#{{{pre2|{{{preSec2|}}}}}}}}}}}}{{!}}{{{pre2name|{{{preSec2name|{{{pre2|{{{preSec2|}}}}}}}}}}}}]]&nbsp;{{{sep|&nbsp;}}}|}} {{
 
#if:{{{pre3|{{{preSec3|}}}}}}|[[{{{pre3link|{{{preSec3link|#{{{pre3|{{{preSec3|}}}}}}}}}}}}{{!}}{{{pre3name|{{{preSec3name|{{{pre3|{{{preSec3|}}}}}}}}}}}}]]&nbsp;{{{sep|&nbsp;}}}|}} {{
 
#if:{{{pre4|{{{preSec4|}}}}}}|[[{{{pre4link|{{{preSec4link|#{{{pre4|{{{preSec4|}}}}}}}}}}}}{{!}}{{{pre4name|{{{preSec4name|{{{pre4|{{{preSec4|}}}}}}}}}}}}]]&nbsp;{{{sep|&nbsp;}}}|}} {{
 
#if:{{{pre5|{{{preSec5|}}}}}}|[[{{{pre5link|{{{preSec5link|#{{{pre5|{{{preSec5|}}}}}}}}}}}}{{!}}{{{pre5name|{{{preSec5name|{{{pre5|{{{preSec5|}}}}}}}}}}}}]]&nbsp;{{{sep|&nbsp;}}}|}} {{
 
#if:{{{pre6|{{{preSec6|}}}}}}|[[{{{pre6link|{{{preSec6link|#{{{pre6|{{{preSec6|}}}}}}}}}}}}{{!}}{{{pre6name|{{{preSec6name|{{{pre6|{{{preSec6|}}}}}}}}}}}}]]&nbsp;{{{sep|&nbsp;}}}|}} {{
 
#if:{{{pre7|{{{preSec7|}}}}}}|[[{{{pre7link|{{{preSec7link|#{{{pre7|{{{preSec7|}}}}}}}}}}}}{{!}}{{{pre7name|{{{preSec7name|{{{pre7|{{{preSec7|}}}}}}}}}}}}]]&nbsp;{{{sep|&nbsp;}}}|}} {{
 
#if:{{{pre8|{{{preSec8|}}}}}}|[[{{{pre8link|{{{preSec8link|#{{{pre8|{{{preSec8|}}}}}}}}}}}}{{!}}{{{pre8name|{{{preSec8name|{{{pre8|{{{preSec8|}}}}}}}}}}}}]]&nbsp;{{{sep|&nbsp;}}}|}} {{
 
<!-- --------------------------------------- Check prebreak-->
 
#if:{{{prebreak|}}}|{{{prebreak}}}}} {{
 
<!-- --------------------------------------- Check symbols -->
 
#ifeq:{{{sym|}}}|yes|[[#!$@|!$@]]|}} {{
 
<!-- --------------------------------------- Check numbers -->
 
#ifeq:{{{num|}}}|yes|{{{0-9|[[#0–9|0–9]]}}}|}} {{#ifeq:{{{symnum|}}}|yes|[[#!–9|!–9]]|
 
<!-- --------------------------------------- List letters -->
 
}} {{{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|&nbsp;|<br />}}{{
 
<!-- ------------------------------ Check after-header1 -
 
          (see NOTE C2 below) -->
 
#if:{{{custom1|{{{Sec1|}}}}}}|[[{{{custom1link|{{{Sec1link|#{{{custom1|{{{Sec1|}}}}}}}}}}}}{{!}}{{{custom1name|{{{Sec1name|{{{custom1|{{{Sec1|}}}}}}}}}}}}]]&nbsp;|}}{{
 
<!-- ------------------------------ Check after-header2...-->
 
#if:{{{custom2|{{{Sec2|}}}}}}|{{{sep|&nbsp;}}} [[{{{custom2link|{{{Sec2link|#{{{custom2|{{{Sec2|}}}}}}}}}}}}{{!}}{{{custom2name|{{{Sec2name|{{{custom2|{{{Sec2|}}}}}}}}}}}}]]&nbsp;|}}{{
 
#if:{{{custom3|{{{Sec3|}}}}}}|{{{sep|&nbsp;}}} [[{{{custom3link|{{{Sec3link|#{{{custom3|{{{Sec3|}}}}}}}}}}}}{{!}}{{{custom3name|{{{Sec3name|{{{custom3|{{{Sec3|}}}}}}}}}}}}]]&nbsp;|}}{{
 
#if:{{{custom4|{{{Sec4|}}}}}}|{{{sep|&nbsp;}}} [[{{{custom4link|{{{Sec4link|#{{{custom4|{{{Sec4|}}}}}}}}}}}}{{!}}{{{custom4name|{{{Sec4name|{{{custom4|{{{Sec4|}}}}}}}}}}}}]]&nbsp;|}}{{
 
#if:{{{custom5|{{{Sec5|}}}}}}|{{{sep|&nbsp;}}} [[{{{custom5link|{{{Sec5link|#{{{custom5|{{{Sec5|}}}}}}}}}}}}{{!}}{{{custom5name|{{{Sec5name|{{{custom5|{{{Sec5|}}}}}}}}}}}}]]&nbsp;|}}{{
 
#if:{{{custom6|{{{Sec6|}}}}}}|{{{sep|&nbsp;}}} [[{{{custom6link|{{{Sec6link|#{{{custom6|{{{Sec6|}}}}}}}}}}}}{{!}}{{{custom6name|{{{Sec6name|{{{custom6|{{{Sec6|}}}}}}}}}}}}]]&nbsp;|}}{{
 
#if:{{{custom7|{{{Sec7|}}}}}}|{{{sep|&nbsp;}}} [[{{{custom7link|{{{Sec7link|#{{{custom7|{{{Sec7|}}}}}}}}}}}}{{!}}{{{custom7name|{{{Sec7name|{{{custom7|{{{Sec7|}}}}}}}}}}}}]]&nbsp;|}}{{
 
#if:{{{custom8|{{{Sec8|}}}}}}|{{{sep|&nbsp;}}} [[{{{custom8link|{{{Sec8link|#{{{custom8|{{{Sec8|}}}}}}}}}}}}{{!}}{{{custom8name|{{{Sec8name|{{{custom8|{{{Sec8|}}}}}}}}}}}}]]&nbsp;|}}{{
 
<!-- ---------------------------------- Check seealso-->
 
#ifeq:{{{seealso|}}}|yes|{{{sep|&nbsp;}}} [[#See also{{!}}See also]]&nbsp;|}}{{
 
<!-- ---------------------------------- Check notesfirst-->
 
#ifeq:{{{notesfirst|}}}|yes|{{{sep|&nbsp;}}} [[#Notes{{!}}Notes]]&nbsp;|}}{{
 
<!-- ---------------------------------- Check refs-->
 
#ifeq:{{{refs|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|{{{sep|&nbsp;}}} [[#References{{!}}References]]&nbsp;|}}{{
 
<!-- ---------------------------------- Check notes-->
 
#ifeq:{{{notes|}}}|yes|{{{sep|&nbsp;}}} [[#Notes{{!}}Notes]]&nbsp;|}}{{
 
<!-- ---------------------------------- Further reading-->
 
#ifeq:{{{further|}}}|yes|{{{sep|&nbsp;}}} [[#Further reading{{!}}Further reading]]&nbsp;|}}{{
 
<!-- ---------------------------------- Check extlinks-->
 
#ifeq:{{{extlinks|}}}|yes|{{{sep|&nbsp;}}} [[#External links{{!}}External links]]|}}{{
 
<!-- ================================== Check invalid words-->
 
#ifeq:{{{break|x}}}|x||<br>
 
  TOC8 - Invalid parameter "break" - try "nobreak=yes".
 
}}{{#ifeq:{{{centre|x}}}|x||<br>
 
  TOC8 - Invalid parameter "centre" - try "center=yes".
 
}}{{#ifeq:{{{Top|x}}}|x||<br>
 
  TOC8 - Invalid parameter "Top" - try lowercase "top=yes".
 
}}{{#ifeq:{{{ref|x}}}|x||<br>
 
  TOC8 - Invalid parameter "ref" - try "refs=yes".
 
}}{{#ifeq:{{{Ref|x}}}|x||<br>
 
  TOC8 - Invalid parameter "Ref" - try lowercase "refs=yes".
 
}}{{#ifeq:{{{note|x}}}|x||<br>
 
  TOC8 - Invalid parameter "note" - try "note'''s'''=yes".
 
}}{{#ifeq:{{{ext|x}}}|x||<br>
 
  TOC8 - Invalid parameter "ext" - try "extlinks=yes".
 
}}{{#ifeq:{{{extlink|x}}}|x||<br>
 
  TOC8 - Invalid parameter "extlink" - try "extlinks=yes".
 
}}</div>
 
|}__NOTOC__<noinclude>
 
  
{{documentation}}
+
Start contents box
<!--PLEASE ADD CATEGORIES & INTERWIKIS TO /doc PAGE, THANKS-->
+
 
 +
--><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 |
 +
        |  <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}}&nbsp;}}}{{#ifeq:{{{side|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes |&#58;<!--(colon)-->}}</span><!--
 +
          --></div><!--
 +
    -->}}
 
<!--
 
<!--
--       -------------------------------------------------
+
 
--NOTES:
+
Links
--
+
 
-- NOTE C2: Parameter "custom1=zzz" or "Sec1=zzz" shows first
+
    --><div style="margin:auto;white-space:nowrap;{{#ifeq:{{{side|{{#ifeq:{{{1}}}|short1|yes}}}}}|yes |display:inline-block;}}"><!--
--          subheader "zzz" after the "0-9 A B C D...".
+
            -->{{#ifeq:{{{top}}}|yes |
--
+
* [[#top|Top]]}}<!--
-- NOTE I3: If-statements can be indented by leaving "{{" at
+
            -->{{#if:{{{pre1|{{{preSec1|}}}}}} |
--         end of previous line and put "#if:" on next line;
+
* [[{{{pre1link|{{{preSec1link|#{{{pre1|{{{preSec1}}} }}} }}} }}}|{{{pre1name|{{{preSec1name|{{{pre1|{{{preSec1}}} }}} }}} }}}]] <!--
--         otherwise indented lines become quote-boxes.
+
            -->}} {{#if:{{{pre2|{{{preSec2|}}}}}} |
--
+
* [[{{{pre2link|{{{preSec2link|#{{{pre2|{{{preSec2}}} }}} }}} }}}|{{{pre2name|{{{preSec2name|{{{pre2|{{{preSec2}}} }}} }}} }}}]] <!--
-- NOTE P2: Parameter "pre1=xxx" shows first subheader "xxx"
+
              -->}} {{#if:{{{pre3|{{{preSec3|}}}}}} |
--          before the condensed "0-9 A B C..." appears.
+
* [[{{{pre3link|{{{preSec3link|#{{{pre3|{{{preSec3}}} }}} }}} }}}|{{{pre3name|{{{preSec3name|{{{pre3|{{{preSec3}}} }}} }}} }}}]] <!--
--
+
                  -->}} {{#if:{{{pre4|{{{preSec4|}}}}}} |
-- NOTE S2: Parameter "sep=&middot;" defines the separator
+
* [[{{{pre4link|{{{preSec4link|#{{{pre4|{{{preSec4}}} }}} }}} }}}|{{{pre4name|{{{preSec4name|{{{pre4|{{{preSec4}}} }}} }}} }}}]] <!--
--         string displayed between subheaders (not letters).
+
                    -->}} {{#if:{{{pre5|{{{preSec5|}}}}}} |
--         It defaults to a single space, "sep=&nbsp;".
+
* [[{{{pre5link|{{{preSec5link|#{{{pre5|{{{preSec5}}} }}} }}} }}}|{{{pre5name|{{{preSec5name|{{{pre5|{{{preSec5}}} }}} }}} }}}]] <!--
--
+
                        -->}} {{#if:{{{pre6|{{{preSec6|}}}}}} |
-- NOTE V9: Coded for MediaWiki language 1.11.1 (Jan.2008);
+
* [[{{{pre6link|{{{preSec6link|#{{{pre6|{{{preSec6}}} }}} }}} }}}|{{{pre6name|{{{preSec6name|{{{pre6|{{{preSec6}}} }}} }}} }}}]] <!--
--         wiki-format now omits HTML comments on web xfer.
+
                          -->}} {{#if:{{{pre7|{{{preSec7|}}}}}} |
--HISTORY:
+
* [[{{{pre7link|{{{preSec7link|#{{{pre7|{{{preSec7}}} }}} }}} }}}|{{{pre7name|{{{preSec7name|{{{pre7|{{{preSec7}}} }}} }}} }}}]] <!--
-- 10Jan09 Added parameters: sep=&middot; and prebreak=<br>.
+
                              -->}} {{#if:{{{pre8|{{{preSec8|}}}}}} |
-- 10Jan09 Added parameters: 3 more custom6, custom7, custom8.
+
* [[{{{pre8link|{{{preSec8link|#{{{pre8|{{{preSec8}}} }}} }}} }}}|{{{pre8name|{{{preSec8name|{{{pre8|{{{preSec8}}} }}} }}} }}}]] <!--
-- 10Jan09 Added parameters: 3 more custom6link...custom8link.
+
                                -->}} {{#if:{{{prebreak|}}} |{{#ifeq:{{{prebreak|}}}|yes|<br />|{{{prebreak}}}[[Category:Pages using compact toc with deprecated syntax]]}}</ul>}} <!--
-- 10Jan09 Added parameters: 3 more custom6name...custom8name.
+
-->{{#ifeq:{{{sym}}}|yes |
-- 10Jan09 Added parameters: pre1, pre2, pre3... pre7, pre8.
+
* [[#!$@|!$@]] }}<!--
-- 10Jan09 Added parameters: pre1link, pre2link ... pre8link.
+
-->{{#ifeq:{{{num}}}|yes |
-- 10Jan09 Added parameters: pre1name, pre2name ... pre8name.
+
* {{{0-9|[[#0–9|0–9]]}}} }}<!--
-- 10Jan09 Added parameters: preSec1, preSec2, ... preSec8.
+
-->{{#ifeq:{{{symnum}}}|yes |
-- 10Jan09 Spot invalid keywords: Top/ref/Ref/note/ext etc.
+
* [[#!–9|!–9]] }}{{#ifeq:{{{letters}}}|no||
-- 10Jan09 Added NOTES comments to explain template coding.
+
* {{{a|[[#A|A]]}}}
-- 10Jan09 Added HISTORY comments to log major changes.
+
* {{{b|[[#B|B]]}}}
-- 01Jul11 Added Further reading
+
* {{{c|[[#C|C]]}}}
-- [These comment lines are omitted before Internet transfer.]
+
* {{{d|[[#D|D]]}}}
--
+
* {{{e|[[#E|E]]}}}
--End Template:CompactTOC8-->
+
* {{{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>}}<!--
 +
 
 +
Custom links
 +
 
 +
-->{{#if:{{{custom1|{{{Sec1|}}}}}} |
 +
* [[{{{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}}} }}} }}} }}}]] <!--
 +
                    -->}}<!--
 +
 
 +
"See also" etc links
 +
 
 +
-->{{#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}}}}}}