Include this template at the top of the main page for a category and it will put a CategoryTree there listing all other pages in the category. (Actually, it can't do that because extension parser hooks can't be transcluded in MediaWiki. :-( )
Uses Category:{{PAGENAME}} by default; pass in {{{1}}} to override and choose which category is used.
<noinclude></noinclude> tags around any category you don't want members/users of the category to inherit!For example:
[[Category:Whatever]] [[Category:Something]] <noinclude>[[Category:Intersection categories]]</noinclude>
{{Has associated category|Templates}}
stuff before that line
Templates edit (Category edit)
stuff after that line
{{link with edit link|{{{1}}} }}
<includeonly>[[{{#if: {{{1|}}}
| {{{1}}}
| {{PAGENAME}}
}}]]
{{Category:{{#if: {{{1|}}}
| {{{1}}}
| {{PAGENAME}}
}}}}