Template talk:Incorrect namespace
This is the talk page for discussing improvements to the Incorrect namespace template. |
|
"This template . . ."
[edit]While looking at Wikipedia:Template messages/Redirect pages, I saw that this template refers to "The template above . . .". The template was indicated in the left column, so my first instinct was to change this template to read, "The template in the left column . . .". Of course, then I realized that on the Diff pages, that would be a misnomer. So I modified the text to read simply, "This template . . .", which clarifies the templates in the index, don't you agree? Also, as I'm a believer in keeping descriptive words to six letters or less, I thought that "added to redirects in . . ." would be a more understandable read. However, if you think "transcluded in . . ." is necessary to keep the redirect from being substituted, then please do revert. — Paine Ellsworth ( CLIMAX ) 23:07, 22 February 2011 (UTC)
Upon rereading the /doc page, I see that "transcluded in . . ." is better, so I self-reverted that part of my edit. — Paine Ellsworth ( CLIMAX ) 23:19, 22 February 2011 (UTC)
- If used correctly, the template is always above the message. It does look a little confusing on Wikipedia:Template messages/Redirect pages; however, in its intended use, it will appear on redirect pages. Because redirect templates are listed one after the other on redirect pages, specifying above ensures readers do not think it is refering to the template below. McLerristarr | Mclay1 04:30, 23 February 2011 (UTC)
- That's not quite correct, Mclay1. If I read the /doc correctly, this template will only appear if the Rcat has been placed in the wrong namespace -- AND -- this template will NOT appear on the redirect. The only place that this template will appear in any case will be the DIFF pages, so the only way an IP editor will know that the Rcat template is in the wrong place is if the HISTORY is checked and the DIFF page selected. And a registered editor will see only the Hidden Category Pages with incorrectly transcluded templates on the redirect page. — Paine Ellsworth ( CLIMAX ) 07:20, 23 February 2011 (UTC)
- PS. And you're right, as it is, it looks very confusing at the WP:Template messages/Redirect pages index! It's really better not to use "above". The index is where this template will get its best and highest usage!
- PPS. Check this out for an example of the ONLY place this template will be seen (other than the index and the individual template pages).
- When I said a template will always be above the message, I meant when the message is visible, it will always be above, never be below or next to it. I know the template can only be seen on redirects when viewing a diff, which can also be viewed when editing as well as through the page history; however, this template isn't just for redirect templates. It can be on any template that should not be transcluded in a particular namespace. The intended use of the template, as a message for incorrect transclusion, is more important than its appearance in a list of templates. It still makes sense in the list though and I don't believe anyone would think it was referring to the template in the row above. If it didn't specify it was for the template above, this would happen:
- That's not quite correct, Mclay1. If I read the /doc correctly, this template will only appear if the Rcat has been placed in the wrong namespace -- AND -- this template will NOT appear on the redirect. The only place that this template will appear in any case will be the DIFF pages, so the only way an IP editor will know that the Rcat template is in the wrong place is if the HISTORY is checked and the DIFF page selected. And a registered editor will see only the Hidden Category Pages with incorrectly transcluded templates on the redirect page. — Paine Ellsworth ( CLIMAX ) 07:20, 23 February 2011 (UTC)
![]() | This page is a redirect:
|
- There's no way of telling which template it's referring to without exploring or testing. If it was in {{This is a redirect}}, people may assume the message refers to {{This is a redirect}} rather than a specific redirect template. McLerristarr | Mclay1 13:49, 23 February 2011 (UTC)
- The solution appears to be to code the "Incorrect namespace" template to include the NAME of the template, as in "The redirect category template, "R from people" should only be transcluded in the Main namespace." — Paine Ellsworth ( CLIMAX ) 00:39, 24 February 2011 (UTC)
- I took your suggestion and its a good idea. Thank you. McLerristarr | Mclay1 03:41, 24 February 2011 (UTC)
- Actually, it didn't work. Using the {{PAGENAME}} function replaces the name of the template with the name of the page the template is transcluded on. McLerristarr | Mclay1 03:49, 24 February 2011 (UTC)
- In the above example, the usage of "template", whether you say just "This template" or "The template above", is still very vague. How does anyone who reads it know that "From people" is the template referred to? They might not even realize that "From people" is a template. That's why it is important to include the NAME of the template being referred to in the Incorrect namespace template. There should be a parser function that would help with that. — Paine Ellsworth ( CLIMAX ) 08:26, 25 February 2011 (UTC)
- I think it's fairly likely that someone who sees the message will know what it means but I'll try includeonly-ing substitution for the PAGENAME function. McLerristarr | Mclay1 08:56, 25 February 2011 (UTC)
- PAGENAME probably won't work. In the index, for example, it will show the pagename of the index, and on the Diff pages, it will show the name of the redirect. You need a parser function that will show the name of the redirect template it ends up in. And I don't know enough about the code to know how to do that. — Paine Ellsworth ( CLIMAX ) 09:08, 25 February 2011 (UTC)
- What I tried to do (in a sandbox) was supposed to work according to Help:Substitution but it didn't. I don't think there's any way of including a page's name automatically other than using PAGENAME. The template could require editors to put the name in manually but that seems like a pain. McLerristarr | Mclay1 09:12, 25 February 2011 (UTC)
- PAGENAME probably won't work. In the index, for example, it will show the pagename of the index, and on the Diff pages, it will show the name of the redirect. You need a parser function that will show the name of the redirect template it ends up in. And I don't know enough about the code to know how to do that. — Paine Ellsworth ( CLIMAX ) 09:08, 25 February 2011 (UTC)
- I think it's fairly likely that someone who sees the message will know what it means but I'll try includeonly-ing substitution for the PAGENAME function. McLerristarr | Mclay1 08:56, 25 February 2011 (UTC)
- In the above example, the usage of "template", whether you say just "This template" or "The template above", is still very vague. How does anyone who reads it know that "From people" is the template referred to? They might not even realize that "From people" is a template. That's why it is important to include the NAME of the template being referred to in the Incorrect namespace template. There should be a parser function that would help with that. — Paine Ellsworth ( CLIMAX ) 08:26, 25 February 2011 (UTC)
- Actually, it didn't work. Using the {{PAGENAME}} function replaces the name of the template with the name of the page the template is transcluded on. McLerristarr | Mclay1 03:49, 24 February 2011 (UTC)
- I took your suggestion and its a good idea. Thank you. McLerristarr | Mclay1 03:41, 24 February 2011 (UTC)
- The solution appears to be to code the "Incorrect namespace" template to include the NAME of the template, as in "The redirect category template, "R from people" should only be transcluded in the Main namespace." — Paine Ellsworth ( CLIMAX ) 00:39, 24 February 2011 (UTC)
- There's no way of telling which template it's referring to without exploring or testing. If it was in {{This is a redirect}}, people may assume the message refers to {{This is a redirect}} rather than a specific redirect template. McLerristarr | Mclay1 13:49, 23 February 2011 (UTC)
There is probably a way to use parser functions. Maybe Martin can help you. He's a lot more well-versed in the markup language than I am. Now to a new problem, Mclay1: Whatever you've done recently with this template has totally screwed up the alphabetical index. I'm going to have to ask you to take all this to a sandbox and keep it there until you get it working properly. I'm sorry, but this just isn't working, and it has to be taken off of the "live" namespace. — Paine Ellsworth ( CLIMAX ) 05:47, 26 February 2011 (UTC)
- I really have no idea what happened to the index page. It was fine before with the {{Incorrect namespace}} template. I haven't made any changes to {{Incorrect namespace}} or {{Redirect template}} that would affect the index. I've checked {{Mbox}} and the templates that make the index page and no changes have been made to them so it is something to do with my templates but the only thing I've changed is removing whitespace and editing the parameters that only appear in conjunction with {{This is a redirect}}, which isn't used in the index. All I can say is "What the?" McLerristarr | Mclay1 16:40, 28 February 2011 (UTC)
- I've studied it and I'm certain it's something to do with {{Incorrect namespace}}, I just don't know what because the index was fine not so long ago when this template was being used. McLerristarr | Mclay1 16:45, 28 February 2011 (UTC)
- OK, problem solved. It was the whitespace I removed from {{Redirect template}} that was the problem. {{Incorrect namespace}} was being added on the same line as the text rather than on a new line and for some reason the message box's table formatting was screwing with the index's table formatting. I've re-added some of the whitespace to fix the problem, although now there's lots of unnecessary whitespace after the template (although it doesn't appear in the index or with {{This is a redirect}}).
- Bravo! Now, to just figure out a way to parser in the name of the specific template in place of the "above" word. Have you tried using {{PAGENAME}} and then substituting this template rather than transcluding it? — Paine Ellsworth ( CLIMAX ) 07:28, 2 March 2011 (UTC)
- OK, problem solved. It was the whitespace I removed from {{Redirect template}} that was the problem. {{Incorrect namespace}} was being added on the same line as the text rather than on a new line and for some reason the message box's table formatting was screwing with the index's table formatting. I've re-added some of the whitespace to fix the problem, although now there's lots of unnecessary whitespace after the template (although it doesn't appear in the index or with {{This is a redirect}}).
- I've studied it and I'm certain it's something to do with {{Incorrect namespace}}, I just don't know what because the index was fine not so long ago when this template was being used. McLerristarr | Mclay1 16:45, 28 February 2011 (UTC)
Subst:
[edit]I just learned something new. Mclay1, were you aware that the magic word {{PAGENAME}} could be substituted? So if you place this magic word on a page and transclude the page to another page, the name of the second page is displayed, but if you subst: this magic word on a page, then transclude the page to another page, that second page displays the name of the first page. Mclay1, can you use that? — Paine Ellsworth ( CLIMAX ) 13:44, 4 March 2011 (UTC)
- PS. There is also a call that looks like
{{safesubst: . . .}}
or something like that, but I'm not sure how it's used. I've seen the substitution of magic words done in several templates, for example, {{Requested move}} uses{{subst:SUBJECTPAGENAME}}
, and so forth.
- How would we substitute the PAGENAME function on the template? We'd need to substitute this template to do that, as {{Requested move}} is. McLerristarr | Mclay1 07:46, 5 March 2011 (UTC)
- I don't think that subbing this template would do the trick. The magic word itself would somehow have to be substituted right at the Rcat itself. Can that be done? That way, it would be the name of the Rcat template that would be displayed whereever this Incorrect namespace is displayed. — Paine Ellsworth ( CLIMAX ) 18:12, 5 March 2011 (UTC)
- Yeah, I tried it in a sandbox but I can't get it to work. Using
{{<includeonly>subst:</includeonly>PAGENAME}}
doesn't work for some reason; it just includes the code as normal text. I asked about it on Wikipedia talk:Substitution and an editor said that includeonly-ing subst: only works if the template itself is substituted. McLerristarr | Mclay1 10:59, 9 March 2011 (UTC)
- Yeah, I tried it in a sandbox but I can't get it to work. Using
- I don't think that subbing this template would do the trick. The magic word itself would somehow have to be substituted right at the Rcat itself. Can that be done? That way, it would be the name of the Rcat template that would be displayed whereever this Incorrect namespace is displayed. — Paine Ellsworth ( CLIMAX ) 18:12, 5 March 2011 (UTC)
- How would we substitute the PAGENAME function on the template? We'd need to substitute this template to do that, as {{Requested move}} is. McLerristarr | Mclay1 07:46, 5 March 2011 (UTC)
Use of template
[edit]Is there any use of this template without conjunction with "XXX other" templates? I mean, it could be reasonable to make whole snippet like {{Help other||{{Incorrect namespace|help}}}}
as separate template with some name like "Ensure namespace" or "Check namespace" --DixonD (talk) 08:26, 2 March 2011 (UTC)
- Yeah, not a bad idea. Do you mean something like this: User:Mclay1/Template:Single namespace? (The first parameter is the namespace the second parameter will appear on, otherwise this template will appear.) McLerristarr | Mclay1 12:01, 2 March 2011 (UTC)
- Yes, something like that
--DixonD (talk) 13:25, 2 March 2011 (UTC)
- I'll move it to the template namespace after the problem in the section above has been resolved. McLerristarr | Mclay1 07:47, 5 March 2011 (UTC)
- Yes, something like that