Difference between revisions of "Template:Compact ToC"

From DMARC Wiki
Jump to navigation Jump to search
m (Trying something extra.)
m (New feature.)
Line 2: Line 2:
 
! {{MediaWiki:Toc}}:
 
! {{MediaWiki:Toc}}:
 
|
 
|
|{{#ifeq:{{{top|}}}|yes|[[#top{{!}}Top]]&nbsp;|}} [[#0–9|0–9]] [[#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 />
+
|{{#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>
 
<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>
 
|}__NOTOC__<noinclude>
Line 8: Line 8:
  
 
----
 
----
{{Complicated}}
+
{{Esoteric}}
 
==Purpose==
 
==Purpose==
This Table of Contents replacement for alphabetical lists provides all the features of [[Template:CompactTOC7]], plus one from [[Template:CompactTOC2]], etc. that #7 doesn't have (the "0-9" section), ''and'' allows you to select what other sections you want. Even the centering is optional.
+
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.
  
 
==Usage==
 
==Usage==
{{tlx|CompactTOC8|top=yes|seealso=yes|refs=yes|extlinks=yes}} for all features (leave off or change to "no" to disable a feature}}
+
{{tlx|CompactTOC8|center=yes|09=yes|top=yes|seealso=yes|refs=yes|extlinks=yes}} for all features (leave off or change to "no" to disable a feature}}
  
 
===Examples===
 
===Examples===
Line 19: Line 19:
 
{{CompactTOC8|top=yes}}
 
{{CompactTOC8|top=yes}}
  
{{tlx|CompactTOC8|top&#61;yes|seealso&#61;yes}}
+
{{tlx|CompactTOC8|center&#61;yes|top&#61;yes|seealso&#61;yes}}
{{CompactTOC8|top=yes|seealso=yes}}
+
{{CompactTOC8|center=yes|top=yes|seealso=yes}}
  
{{tlx|CompactTOC8|refs&#61;yes|extlinks&#61;yes}}
+
{{tlx|CompactTOC8|09&#61;yes|refs&#61;yes|extlinks&#61;yes}}
{{CompactTOC8|refs=yes|extlinks=yes}}
+
{{CompactTOC8|09=yes|refs=yes|extlinks=yes}}
  
 
{{tlx|CompactTOC8|top&#61;no|refs&#61;yes|extlinks&#61;yes}}
 
{{tlx|CompactTOC8|top&#61;no|refs&#61;yes|extlinks&#61;yes}}
 
{{CompactTOC8|top=no|refs=yes|extlinks=yes}}
 
{{CompactTOC8|top=no|refs=yes|extlinks=yes}}
  
{{tlx|CompactTOC8|top&#61;yes|seealso&#61;yes|refs&#61;yes|extlinks&#61;yes}}
+
{{tlx|CompactTOC8|center&#61;yes|09&#61=yes|top&#61;yes|seealso&#61;yes|refs&#61;yes|extlinks&#61;yes}}
{{CompactTOC8|top=yes|seealso=yes|refs=yes|extlinks=yes}}
+
{{CompactTOC8|center=yes|09=yes|top=yes|seealso=yes|refs=yes|extlinks=yes}}
  
 
[[Category:TOC templates|{{PAGENAME}}]]
 
[[Category:TOC templates|{{PAGENAME}}]]
 
[[Category:Templates using parser functions|{{PAGENAME}}]]
 
[[Category:Templates using parser functions|{{PAGENAME}}]]
 
</noinclude>
 
</noinclude>

Revision as of 09:36, 24 April 2007

Contents: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z



Template:Esoteric

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.

Usage

{{CompactTOC8}} for all features (leave off or change to "no" to disable a feature}}

Examples

{{CompactTOC8|top=yes}} Template:CompactTOC8

{{CompactTOC8|center=yes|top=yes|seealso=yes}} Template:CompactTOC8

{{CompactTOC8|09=yes|refs=yes|extlinks=yes}} Template:CompactTOC8

{{CompactTOC8|top=no|refs=yes|extlinks=yes}} Template:CompactTOC8

{{CompactTOC8|center=yes|top=yes|seealso=yes|refs=yes|extlinks=yes}} Template:CompactTOC8