Many templates share the same documentation. ForPutting example,TemplateData {{tl|multicol}},on {{tl|multicol-break}}a andsubpage {{tl|multicol-end}}has the advantage that the documentation page is generally not protected so all useeditors [[Template:Multicol/doc]]can update the documentation. IfHowever, if the TemplateData is included in thea shared documentation page then this will cause some of the templates to pick up the wrong template data section.
This can be resolved by putting the TemplateData in an individual subsubpage page, {{tl|([[Template:col-begin}}/doc]] uses [[Template:Col-begin/TemplateData]]) or in the template page itself (as in {{tl|collapse top}}). An alternative technique is to use [[Wikipedia:Switch|<code><nowiki>{{#switch: {{PAGENAME}} | ...}}</nowiki></code>]] in the document page with the different templatedata sections in each switch block. [[Template:Multicol/doc]] is an example of this. This has the advantage that the documentation page is generally not protected so all editors can update the documentation.