Difference between revisions of "Template:Compact ToC"
Jump to navigation
Jump to search
(massive, tested update: added 68 new parameters "pre1, pre2,...pre8, prebreak, sep" plus validation & comments; see talk: Template_talk:CompactTOC8#New parameters, validation & internal comments) |
(re-edited to transclude /doc page, after waiting nearly 6 hours and no auto-reformat: still showed old included template documentation; added internal "NOTE I3" about indenting if-statements) |
||
Line 6: | Line 6: | ||
<!-- ----------------------------------- Check center/right--> | <!-- ----------------------------------- Check center/right--> | ||
#ifeq:{{{center|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|align="center"|}}{{#ifeq:{{{right|}}}|yes|align="right"|}} | #ifeq:{{{center|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|align="center"|}}{{#ifeq:{{{right|}}}|yes|align="right"|}} | ||
− | {{ | + | {{ <!--see NOTE I3 below--> |
<!-- ----------------------------------- Check name/side--> | <!-- ----------------------------------- Check name/side--> | ||
#ifeq:{{{name|}}}|no||! {{{name|{{MediaWiki:Toc}}}}}{{#ifeq:{{{side|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|:|}} | #ifeq:{{{name|}}}|no||! {{{name|{{MediaWiki:Toc}}}}}{{#ifeq:{{{side|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|:|}} | ||
Line 80: | Line 80: | ||
-- NOTE C2: Parameter "custom1=zzz" or "Sec1=zzz" shows first | -- NOTE C2: Parameter "custom1=zzz" or "Sec1=zzz" shows first | ||
-- subheader "zzz" after the "0-9 A B C D...". | -- subheader "zzz" after the "0-9 A B C D...". | ||
+ | -- | ||
+ | -- NOTE I3: If-statements can be indented by leaving "{{" at | ||
+ | -- end of previous line and put "#if:" on next line; | ||
+ | -- otherwise indented lines become quote-boxes. | ||
-- | -- | ||
-- NOTE P2: Parameter "pre1=xxx" shows first subheader "xxx" | -- NOTE P2: Parameter "pre1=xxx" shows first subheader "xxx" |