Last modified: 2014-11-04 22:53:16 UTC
and make a preview.
"Templates used on this page:" will shows all templates of the
page. The section does not contain any template.
This would require parsing the text on edit. Possible but ugly.
A related issue: When adding a new section, "Templates used on this page:"
should not appear.
* the previous was refering to the "old" test wiki
* the new url reflects comment 2
a) list only the templates used in the (meta-)section
=== a ===
==== 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
Relates also to the unability to see the "new" templates in preview. This would
be required when "debugging" a page.
*** Bug 11385 has been marked as a duplicate of this bug. ***
*** Bug 11637 has been marked as a duplicate of this bug. ***
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?
*** Bug 13845 has been marked as a duplicate of this bug. ***
*** Bug 14136 has been marked as a duplicate of this bug. ***
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.
*** Bug 16130 has been marked as a duplicate of this bug. ***
Updated summary for more detail
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?
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"?
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  and [edit source] on every header.
* Bug 48429 - VisualEditor: Support editing of sections inside a page.
I fail to see the urgency, hence resetting priority lower.
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".
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.
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.
Trying to summarize with an example:
* In edit view, there are no templates listed. https://en.wikipedia.org/w/index.php?title=Toyota_Land_Cruiser&action=edit§ion=2
* 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.
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.