Last modified: 2010-06-10 23:19:40 UTC
Sample Template T ================== {| style="width: 85%; margin-left: border-collapse: collapse; background: #FBFBFB; border: 1px solid #aaa; border-left: 10px solid #ffb400;" | '''Note:''' {{{1}}} |} <noinclude> ---- This template is used for a highlighted note. ;Usage: :<tt><nowiki>{{Tip|1}}</nowiki> ::<nowiki>{{1}}</nowiki> = Text of the tip</tt> </noinclude> The goal is to transclude that template into a numbered list, to produce: 1. Item A Text 2. Item B A. Template with no indent ========================== If T does not contain indentation, an attempt to indent a reference to it fails to indent properly, and breaks list numbering. So -- #Item A #:{{T| Text}} #Item B Produces: -------- 1. Item A text 1. Item B B. Template includes list indentation (#:{| style=...) ====================================================== If the template includes indentation using "#:", it simply breaks. (That would be brittle in any case, as it would require different versions of the template for different indents, with each list type.) C. Template includes double indent (::{| style=...) =================================================== If the template includes indentation using "::", the transclusion appears in the correct place, but list numbering is broken. So -- #Item A #:{{T| Text}} #Item B Produces -------- 1. Item A Text 1. Item B
Note: The template may well be breaking list numbering for other reasons. But the sample is the type that is needed, with the recommended usage information.
Tables are block elements, no wonder they don't work inside lists. If you intend to use notes inline, you could make it a span, ie. <span style="width: 85%; margin-left: border-collapse: collapse; background: #FBFBFB; border: 1px solid #aaa; border-left: 10px solid #ffb400;"> '''Note:''' {{{1}}} </span> Then you will be able to #: indent it.
Very nice! Many thanks for the helpful info. I inherited a local Wiki instance, and followed an anti-pattern. I appreciate the help! (Much nicer than just tossing the non-bug.) :__)