Last modified: 2011-03-13 18:04:44 UTC
The French Wiktionary (and possibly other projects too) uses a set of templates to harmonize section titles. For example [[:wikt:fr:template:-étym-]] is one of them. The problem is that the "edit section" link is not provided. Having a bot "subst:" all these templates seems to be a very heavy task. It would take months, someone on the village pump there is saying. I know this is a feature, not a bug, but would it not be good to have a new "enable edit section links from templates"(with the power of editing the inserting page, not the template) feature on Mediawiki ?
This has nothing to do with transclusion; it's because the template is using <h3> tags rather than wikimarkup. If it was switched to use wikimarkup, the editsection links would point to the template rather than the including page, for sure. That's not realistic to change, as a template may contain one or more section headers, and there's no way to easily decide which block of wikitext on an including page 'represents' the section that's being asked to be edited. If you reimplemented the template so it was called as: ==={{-étym-}}=== And contained just the contents of the header: <span class="icone">[[Image:Nuvola apps bookcase.svg|30px|link=Aide:Étymologies|Origine et histoire de « {{PAGENAME}} »]]</span> Étymologie<noinclude>... You would get section edit links pointing to the right place.
Well, that's an option, this is probably what I would have done if I had created those templates myself. But you need people to memorize the number of "=", whether "=" or "==" or "===" or "====". If these "=" are inside the template, people can simply focus in typing the template name, without needing to memorize anything else.
I was also wondering if it could not be made possible to request at least one set of "=" to be put outside the template, and to have the other "=" inside the template. The software would add up all the "=", those inside and those outside, and find out which title level is required.
(In reply to comment #2) > Well, that's an option, this is probably what I would have done if I had > created those templates myself. That's the *only* option, because the other behaviour is not viable. Imagine a page [[Foo]] which contains: ---------------------------------------------- ==Header 1== Text {{bar}} ==Header 4== Text ---------------------------------------------- Where [[Template:Bar]] contains: ---------------------------------------------- ==Header 2== Text ==Header 3== Text ---------------------------------------------- When you click the edit section link for header 2, which page, and which block of wikitext, should appear in the edit window? This is only the simplest of examples; it would be very easy to construct a thoroughly pathological sample. Changing the destination of these section links is not going to happen. > But you need people to memorize the number of "=", whether "=" or "==" or "===" > or "====". If these "=" are inside the template, people can simply focus in > typing the template name, without needing to memorize anything else. Having the template wrapped in header tags is also quite useful for highlighting that it's actually a header. Regardless, this is really not more than a minor inconvenience. (In reply to comment #3) > I was also wondering if it could not be made possible to request at least one > set of "=" to be put outside the template, and to have the other "=" inside the > template. The software would add up all the "=", those inside and those > outside, and find out which title level is required. That would indeed be nice, but that's a separate issue (probably related to bug 12974) for which you should file a separate bug. The specific example raised in the bug report is INVALID, the underlying request ("make section edit links not point to templates") is WONTFIX. Take your pick, but please don't bugwar; you can still comment on closed bugs.