Last modified: 2011-03-13 18:05:27 UTC
When transcluding a page like {{:mypage}} the section headers of that page are included in the TOC. Sometimes the calling page has a different header structure and basically would need all section headers of the transcluded page one level lower. It would be nice, if there was a function like {{:mypage|headers=+1}}.
Transclusion is not designed for this purpose. Templates should be appropriately laid out.
If you want to include templates at different levels like this, you can do it with appropriate template design: ={{{header|=}}} Heading 1 {{{header|=}}}= text text text ={{{header|=}}} Heading 2 {{{header|=}}}= text text text Here, {{template|header=}} gives a level-1 heading, {{template|header===}} gives a level-3 heading, etc. (This example makes it level-2 by default.)
It strikes me odd to see this request for enhancement closed with won't fix. True, MediaWiki is not designed for this, that is why I made a request for enhancement. And I am not using templates in this case, but would like to include one article into another, more like making a book. Kind of reusing the same article multiple times. Anyhow, MediaWiki has grown to be a multi-purpose wiki with great work of the developers and especially people like Rob and Brion. On the other hand, they have a quite good interest in keeping the software stick to its original purpose, powering Wikipedia and other all-open-wikis. They do have a good point, trying to keep the software stable by keeping the complexity down and not maintaining code, which is not of interest to these platforms. I do agree, this is a minor enhancement, that would be used only by very few people. On the other hand, I have seen quite understandable requests that have been closed just as fast. I am wondering if there is a community consensus discussion on the further development of this beautiful software. Maybe it would be a good idea, to think of an enterprise branch which will focus on these specific needs found there. Following the discussions on the mailing lists and wikimania, there seems to be quite an interest developing. But this is probably not the right place to discuss this. Just my humble opinion.
The good news is that since it could be implemented as an extension, there's no reason to implement it in the core code, anyway. Maybe if there's enough desire for it on one project, someone could implement it in that project.