"Templates used on this page" on section edit should show templates used in the section at initial edit as well as preview


Author: gangleri

Please edit
and make a preview.

"Templates used on this page:" will shows all templates of the
page. The section does not contain any template.

Regards Reinhardt

Version: 1.22.0
Severity: normal

bzimport added a project: MediaWiki-Page-editing.Via ConduitNov 21 2014, 7:04 PM
bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz878.
bzimport created this task.Via LegacyNov 14 2004, 7:18 AM
brion added a comment.Via ConduitNov 29 2004, 12:31 AM

This would require parsing the text on edit. Possible but ugly.

bzimport added a comment.Via ConduitDec 23 2005, 6:31 AM

brian wrote:

A related issue: When adding a new section, "Templates used on this page:"
should not appear.

bzimport added a comment.Via ConduitMay 5 2006, 10:38 AM

gangleri wrote:

updated url

  • the previous was refering to the "old" test wiki
  • the new url reflects comment 2

possible implementations:
a) list only the templates used in the (meta-)section


a one
a two

b) *dynamicaly* list the used templates in preview; this was mentioned at

Bug 5604: 'Templates used on this page:' should display in "view source" for
protected pages
Relates also to the unability to see the "new" templates in preview. This would
be required when "debugging" a page.

brion added a comment.Via ConduitSep 18 2007, 6:07 PM
  • Bug 11385 has been marked as a duplicate of this bug. ***
brion added a comment.Via ConduitOct 15 2007, 8:06 PM
  • Bug 11637 has been marked as a duplicate of this bug. ***
bzimport added a comment.Via ConduitFeb 5 2008, 6:52 PM

matthew.britton wrote:

Have I missed something, or is this fixed now? If I edit a section, or start a new one, and hit preview, I am shown only the templates in that section. If there are none, there is no list.

The only thing that doesn't seem to be fixed is bug 11637, which was marked as a duplicate of this one even though it seems to address a different issue.

When you edit a page, you are shown the list of templates used immediately. When editing a section, you are not shown the list of templates unless you hit "Show preview". At no point do you see templates that aren't used in that section; rather, you just fail to see ones that are.

If that can be fixed, great; if not, should this be marked as fixed and bug 11637 reopened?

bzimport added a comment.Via ConduitApr 26 2008, 8:55 AM

herd wrote:

*** Bug 13845 has been marked as a duplicate of this bug. ***

brion added a comment.Via ConduitMay 15 2008, 9:21 PM
  • Bug 14136 has been marked as a duplicate of this bug. ***
brion added a comment.Via ConduitMay 15 2008, 9:22 PM

Per bug 14136, we do appear to be showing the current (thus incorrect) list for full-page edits starting from an old revision; in addition we're still listing blank for section edits until the preview is done.

Lejonel added a comment.Via ConduitOct 26 2008, 5:57 PM

*** Bug 16130 has been marked as a duplicate of this bug. ***

brion added a comment.Via ConduitDec 30 2008, 2:52 AM

Updated summary for more detail

bzimport added a comment.Via ConduitJul 24 2009, 1:52 PM

happy.melon.wiki wrote:

Perhaps it would be best just not to show the transclusion list if we have reason to believe (presence of 'section', 'oldid', etc, GET variables) that it won't be accurate?

G.Hagedorn added a comment.Via ConduitNov 26 2011, 8:39 AM

In version 1.18 it seems that for section edit NO templates are ever shown. I find this quite confusing. Perhaps a better solution would be always to show the templates of the page, but simply clearly label as: "Templates used on the page containing this section" oder "Templates used in this or other sections of the page"?

Timeshifter added a comment.Via ConduitJun 17 2013, 4:37 AM

I removed the URL in the description because it does not illustrate anything.

I had no idea until today that a list of templates used in a section existed. I knew only of the full page list. I did not know that a preview of a section edit would show a list of templates used in the section.

It is important to fix this because with the roll-out of the VisualEditor (VE) there is a huge necessity to simplify finding the stuff that VE can't edit.

VE will more than likely have "edit source" links or icons for every section. People will be using those links all the time in order to try to edit or move around those templates in article sections.

Transcluded templates in those sections will not be easily accessible to many editors due to the common lack of knowledge about how to get to them. I have tens of thousands of edits on Wikipedia and always went to the full-page list to find them. That is difficult.

Concerning editing after VE is implemented there are multiple bug requests for ease of access to wikitext source editing of sections and templates in sections. See these discussions (or find them in the archives):


  • Bug 49665 - VisualEditor: Provide a get-me-into-the-wikitext-editor link on every header.
  • Bug 49666 - VisualEditor: Display both [edit] and [edit source] on every header.
  • Bug 48429 - VisualEditor: Support editing of sections inside a page.
Aklapper added a comment.Via ConduitJun 18 2013, 1:09 AM

I fail to see the urgency, hence resetting priority lower.

Timeshifter added a comment.Via ConduitJun 18 2013, 9:37 AM

I discuss this further here:
[[Wikipedia:VisualEditor/Feedback]] - see the thread titled "View list of transcluded templates in a section" or something similar. You can find it in the archives when it is moved there.

From what I can tell the visual editor edits template text poorly, and does not edit the formatting at all. I am not sure if VE can, or will be able to, edit transcluded templates at all. At least not where the transcluded template is used in a section of an article. In any case the most thorough editing of a template is done with the source editor.

So we need quicker access to a list of transcluded templates used in that section of the article. Also, the name needs to be changed from "View templates on this page" to "View templates in this section".

[[Wikipedia:VisualEditor/Feedback]]. To see what I am talking about hit the edit source link for any discussion section with a Bugzilla tracking template. You will not see any template links after the edit window. Then click the "show preview" button. You will now see the Bugzilla tracking template linked after the edit window under "view templates".

Timeshifter added a comment.Via ConduitJun 19 2013, 5:54 AM

Here is a page that has a table and a couple transcluded navigation-box templates at the bottom:
[[List of countries by incarceration rate]]

With VisualEditor (VE) the table is editable and WYSIWYG.

But with VE the existing text in the 2 navigation boxes at the bottom of the page can not be edited as far as I can tell. At least not within VE from that page. I am talking about after clicking the edit icons for the navigation boxes.

In VE new parameters can be added to one of the templates, but not to the other. I don't see a way to edit the text for existing parameters in either navigation box.

So to be able to edit one of those templates better in source mode or VE it would be helpful to have links to the template pages. It would be more helpful if those links were more easily accessible than they are now.

See related bug 49772 - "VisualEditor: Template dialogs should include a link to the [template:name] page". But that is only talking about links to the top-level templates.

Sometimes I also want links to component templates for various reasons. Such as to be able to read more documentation, choose better templates, etc.. All those templates need to be more accessible by having the template list for a section show up when first clicking the edit link for a section.

Patrick87 added a comment.Via ConduitJun 26 2013, 7:13 PM

I'd also love if "View templates on this page" would be visible directly when doing section edits (without the need of doing a preview first).

The reason is, that I'm often involved in discussions around templates. If I want to comment on a section I click the corresponding edit link. If I want to easily check the documentation page of a template used in the section I have to do a preview first to actually get a click-able link.

Qgil added a comment.Via ConduitApr 30 2014, 6:23 AM

Trying to summarize with an example:


Edit source

  • After clicking preview, "Templates used in this preview:" are shown.

So it seems that we are in the same point where we were almost 10 years ago.

At the time Brion said:

This would require parsing the text on edit. Possible but ugly.

This is probably true still today, and this is perhaps why there hasn't been any change. The use case for this seems to be quite marginal, and the alternative relatively simple: click Preview.

Proposing a Wontfix.

Timeshifter added a comment.Via ConduitApr 30 2014, 11:19 PM

Until I read this thread awhile back I did not know one could get a list of templates used in a section. By any means. So by reading this thread I learned I could click preview to get that list. Funny thing is that I forgot this trick until just now when I read this thread again - after getting an email about this thread being modified. :)

So maybe one thing that could be done to let people know is to add a link called "Show templates in this section". Add it to the top or bottom of the edit window. At least then I would not forget. It could be another preview link, or it could actually do the same thing as a preview but only show the list of templates. Or just the edit window and the list of templates. Preview would be removed or made invisible.

I am one of the top 2500 editors (by edit total) on Wikipedia, and for years I did not know I could use the "Page information" link in the toolbox to get a list of templates used on the whole page. I always clicked the top edit button on a page to get to templates. Anything that helps editors do things faster is important nowadays. Since there are more articles and less editors.

The other alternative "parsing the text on edit" would slow down the opening a section for editing, I believe. Never a good idea. Now that I think about it why not avoid showing a list of templates at anytime, even for a whole page, except when one specifically clicks a link:
*"Show templates in this section".
*"Show templates in this page".
That would speed up opening pages and sections for editing.

That could especially help the visual editor open a page faster for editing. Its long time to open pages with lots of templates and/or references for editing is its fundamental flaw. Especially since VE does not have true section editing.

mxn added a subscriber: mxn.Via WebNov 24 2014, 8:51 PM

Add Comment