Hi fellow wikiholics,
I'm new to the mailing list. I realized today that when you click Edit on a page you can see all the templates used on the page.
What's anoying is that this only works with "page edit" and not when you just click to edit a section. Which means you have to do at least 2 more clicks after realizing that a template is being used and you'd like to edit the template.
Is there anyway around this problem? I want to see my page templates no matter what edit I click on. And I'd like to not have to hack any php if possible.
Joe
The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message.
Caucci, Joe wrote:
Hi fellow wikiholics,
I'm new to the mailing list. I realized today that when you click Edit on a page you can see all the templates used on the page.
What's anoying is that this only works with "page edit" and not when you just click to edit a section. Which means you have to do at least 2 more clicks after realizing that a template is being used and you'd like to edit the template.
Is there anyway around this problem? I want to see my page templates no matter what edit I click on. And I'd like to not have to hack any php if possible.
Joe
I don't think so. The information about which templates are used come from the database. From what was saved last time, not from the content you're seeing now. You can see eg. templates which are not directly included in the page, but come from several template-including levels.
Also, there're some weird cases: {{template1|text= ==Section 1== Lorem ipsum dolor }}{{template2|text= ==Section 2== sit amet, consectetur adipisici elit }}
Now, if you edit section 1, you get ==Section 1== Lorem ipsum dolor }}{{template2|text="
What's the expected used-templates output?
On the other hand, you could easily produce some 'simple' template list, even with Javascript. Making section editing show all templates *on the full page* would be easy, too.
Also, there're some weird cases: {{template1|text= ==Section 1== Lorem ipsum dolor }}{{template2|text= ==Section 2== sit amet, consectetur adipisici elit }}
Now, if you edit section 1, you get ==Section 1== Lorem ipsum dolor }}{{template2|text="
Do you? The editsection links for transcluded sections take you to the edit page for the template. The section doesn't have a section number in the main page, so you can't even edit it with url hacking.
On the other hand, you could easily produce some 'simple' template list, even with Javascript. Making section editing show all templates *on the full page* would be easy, too.
Either of those would work reasonably well.
Either of those would work reasonably well.
To show on editsection all templates on the page, on editpage.php lines 1152-1153 replace
$templates = ($this->preview || $this->section != '') ? $this->mPreviewTemplates : $this->mArticle->getUsedTemplates(); $formattedtemplates = $sk->formatTemplates( $templates, $this->preview, $this->section != '');
by $templates = ($this->preview || $this->mPreviewTemplates != '') ? $this->mPreviewTemplates : $this->mArticle->getUsedTemplates(); $formattedtemplates = $sk->formatTemplates( $templates, $this->preview, $this->section != '' && $this->mPreviewTemplates != '');
Also, if you have enabled on your preferences Show preview on first edit, you will get the correct section templates even without this patch.
mediawiki-l@lists.wikimedia.org