Help:Editing sections of included templates
From The Scuba Wiki
Revision as of 17:39, 28 August 2008
Editing sections of included templates
This section appears in Help:Section.
The section editing feature can also be applied to a section of an included page or template. When clicking the edit link of the section that is transcluded, the link target will be the edit page of the separate page. This section, Help:Editing sections of included templates, is an example.
For the purpose of section editing the extent of a section is governed by the headings in the calling page itself. If there is a text before the first section heading of the separate page, this will appear as a part of the section of the parent page that includes the template tag, but clicking its section edit link will not show the wikitext of the separate page. Or if there is a text after the template tag without a specific section heading, to edit this text with section edit feature, one has to click the section headings preceding the template tag.
Therefore it tends to be confusing if the extent of sections in the rendered parent page is different from what the actual wikitext contains. To avoid this:
- if a template has headings, do not put any text before the first heading
- in the calling page, start a new section after a template that itself has sections
It may be convenient, where suitable, to start a template with a section heading, even if normally the contents of the template would not need a division into sections, and thus the template is only one section. The section editing feature can then be used for editing the template from a page that includes it, without specially putting an edit link. This template is an example, it does not need a division into sections, but has a heading at the top.
Note that a parameter value appearing in a template, for example "{{{1}}}", is not edited by editing the template but by editing the template tag in the calling page, even though the rendered page and its edit links do not automatically show that. Some explanatory text and/or an extra edit link can be useful.
The __NOEDITSECTION__ tag in any template affects both that template, the pages it's included on, and any other templates included on the same page.