Categories | ||||
|
To help centralise discussions and keep related topics together, the talk pages of its sister templates, such as {{ main other}} and {{ file other}}, redirect here. |
Template:Main talk other is permanently
protected from editing because it is a
heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by
consensus, editors may use {{
edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's
documentation to add usage notes or
categories.
Any contributor may edit the template's sandbox. This template does not have a testcases subpage. You can create the testcases subpage here. |
Text and/or other creative content from this version of Template:Main_other was copied or moved into incubator:Template:Wp/nod/main_other with this edit. The former page's history now serves to provide attribution for that content in the latter page, and it must not be deleted as long as the latter page exists. |
Archive 1 (2008 March - ) |
For future reference and so I can link people to an example:
I have just discovered that some of the things we use {{
main talk other}} for can be done in CSS only. MediaWiki sets the
namespace number as a class in the <body>
tag for the rendered pages. Thus we can use CSS to detect the namespace and show different looks on boxes.
Such CSS code has to be added as classes in for instance
MediaWiki:Common.css, it can not be added as style=""
parameters in page code. Below is a code example showing how to do it. If you want to test it you need to copy the CSS code to
your own monobook.css.
/* Testing namespace detection. */
.davidbox { /* Any namespace */
width: 80%;
margin: 0 auto 1em auto;
padding: .2em;
border: 1px solid #aaa; /* Other space colours */
background: #f9f9f9;
}
.ns-0 .davidbox { /* Main (article) space */
border: 1px solid #aaa; /* Ambox colours */
border-left: 10px solid #1e90ff;
background: #fbfbfb;
}
.ns-1 .davidbox,
.ns-3 .davidbox,
.ns-5 .davidbox,
.ns-7 .davidbox,
.ns-9 .davidbox,
.ns-11 .davidbox,
.ns-13 .davidbox,
.ns-15 .davidbox,
.ns-101 .davidbox { /* Any talk space */
border: 1px solid #c0c090; /* Brown talk space colours */
background: #f8eaba;
}
And here is a small table that uses the namespace detecting CSS code above:
<table class="davidbox">
<tr><td>Testing the davidbox namespace detection.
</table>
And here is how it renders:
Testing the davidbox namespace detection. |
If you haven't installed the CSS code it won't look like much. But with the CSS code it will render as an ambox when on article pages, as a brown talk page message box when on any talk page and as a normal grey messagebox when on any other kind of page.
Neat, isn't it?
-- David Göthberg ( talk) 22:06, 12 April 2008 (UTC)
What is the reason for using these templates? Why not just use the traditional method of directly using parser functions? --- RockMFR 16:38, 7 July 2008 (UTC)
I have removed the "return namespace name" function from all these namespace detection templates. Since it is not used, not needed and it causes problems in some situations.
That is, I removed the code that returned the name of the namespace when these templates were used without any parameters. (Or with all parameters empty.) These templates now instead return an empty string (renders nothing) in this case. Before I removed the function I checked that no template or page was using these templates in that way.
-- David Göthberg ( talk) 13:06, 12 July 2008 (UTC)
I'm rather surprised you haven't done anything like this yet (that I can see), I've been kicking the idea around for awhile now of a template to automate the process of determining if a given page is a base page or a subpage - this would be very useful in userboxes, where often no such detection is used before categorizing pages the userbox is transcluded onto. Any thoughts? — Dino guy 1000 18:59, 22 October 2008 (UTC)
{{basepage subpage | Basepage text. | Subpage text. | demospace = base / sub }}
#switch
anyways, right? I actually would have gone and coded up a sample myself, but I wasn't really clear on how to do the demospace parameter (although I suppose I could have just looked off of this template). One last thought, it would be interesting if the template could detect what level of subpage it's transcluded onto, but of course I don't see any real use for such a feature, and it's not even possible using just MediaWiki markup, ParserFunctions, and magic words AFAIK, so it's more me as a programmer thinking of a programming challenge. ^_^;; —
Dino
guy
1000 17:39, 23 October 2008 (UTC){{#titleparts:}}
parser function. It is a little known but very powerful parser function. I have become pretty adept at using that one since I coded up the {{
editnotice loader}} some week ago. If we have a need for multiple subpage levels then I know how we can have a nice syntax for how to feed the parameters to the {{
basepage subpage}} template:{{basepage subpage | 1 = Basepage text. | 2 = Subpage text, any level. | demospace = basepage / subpage / subsubpage }} {{basepage subpage | 1 = Basepage text. | 2 = Subpage text, first level. | 3 = <!-- Empty but defined parameter, means empty subsub level. --> | demospace = basepage / subpage / subsubpage }} {{basepage subpage | 1 = Basepage text. | 2 = Subpage text, first level. | 3 = Subsubpage text, and for any level below that. | demospace = basepage / subpage / subsubpage }}
#titleparts:
before (even though I saw {{
editnotice loader}} yesterday)! I'll have to play around with it some time. As for multiple param values, that is true, isn't it? In that case, I don't see the harm in using "basepage"/"subpage" in full. As for showall, all I can say is... yikes... that's almost as scary as the parameter lists for all the cite templates! BTW, for another case in which {{
basepage subpage}} would be useful, I just finished creating
documentation for {{
Infobox animanga/Header}} that is meant to be transcluded both onto the template and onto the
central documentation page, which involved basepage/subpage detection to conditionally transclude categories and interwikis, as well as to control the display of a message (clone of the "This documentation is transcluded from" line from {{
documentation}}, vs. a {{
notice}} about how documentation for the other components can be found). It was hard enough at first, but now that it's worked out, it should be fairly simple to do this for all the other components (although I'm
awaiting comments on it ATM). —
Dino
guy
1000 21:35, 23 October 2008 (UTC){{doc other | Text for /doc pages. | Text for any other pages, both basepages and subpages. | demospace = doc / other }}
{{if pagename | /doc = Text for /doc pages. | /something = Text for any pagename that ends in "/something". | other = Text for any other pages, both basepages and subpages. | demospace = ... }}
{{if pagename | /doc = Text for /doc pages. | /something = Text for any pagename that ends in "/something". | basepage = Text for any basepage. | subpage = Text for any subpage. | other = Text for any other pages, both basepages and subpages. | demospace = ... }}
{{if pagename | /other = Text for any subpage. | other = Text for any pages. But not for subpages if "/other" was fed. }}
{{template name|basepage=text|subpage=different text}}
usage. Other than that, my only thought is what if you *want* more than one parameter to display its contents (e.g. you have text that should be displayed on all subpages, but you have another message that should be displayed on a specific subpage, in addition to the specific message)? I suppose in such a case, you could just duplicate the generic message in the parameter for the specific subpage, though. And what about the backslash? Would that be required, and what would happen if it was omitted? (and one last thought, since you seem like you might know, could you explain on my talkpage how substitution detection works? I've tried to follow the code for it in templates, but can't quite figure it out (not that I've tried very hard =P )) —
Dino
guy
1000 17:46, 25 October 2008 (UTC){{if pagename | subpage = Text for any subpage. }}{{if pagename | /doc = Text for /doc pages. }}
So DG, have you gotten any time to poke at this yet? *is still caught slightly off-guard whenever David is called "DG"* — Dino guy 1000 21:18, 15 December 2008 (UTC)
I need a another language version of this Template, and I need the source code. What should I do now? -- Gantulgaas ( talk) 12:26, 28 October 2008 (UTC)
When will the template be moved to Template:File other? -- Joshua Issac ( talk) 14:53, 14 December 2008 (UTC)
Where does the last line of this template come from?
--Gerson75 (talk) 23:24, 23 December 2008 (UTC)copyright:gerson chicarelli 2008
...and who is Gerson Chicarelli, why does s/he holds a copyright? Or, more likely: how to stop this weirdo, as its name shows up on a few different places as well... 88.217.39.117 ( talk) 14:14, 28 January 2009 (UTC)
This message is mostly for Hornoir, since I want to make major changes to the {{ talkspace detect}} template he created. But ideas and comments from anyone else is of course always welcome.
Last month Hornoir created the {{ talkspace detect}} template with similar functionality as the {{ namespace detect}} template, but with the purpose of separating different talk spaces instead of different subject spaces. ("Subject space" is MediaWiki jargon for all the non-talk spaces.) I think he choose a very good name for it, and we probably need such a template. But I want to do a major rework of it so it becomes compatible with the other namespace detection templates.
1: I want to add a "demonspace" parameter, since that is one of the most useful features in the other namespace detection templates. That means when we build other templates with them we can easily test and demonstrate how those templates will behave when in different namespaces, already when doing testing in a /testcases subpage. And we can demonstrate their different looks in their template documentation.
2: The demospace parameter needs to be fully parameter compatible with the other namespace detection templates. Since some templates out there use more than one of the namespace detection templates at the same time. A single template might use say {{ main other}}, {{ talk other}} and {{ talkspace detect}} at the same time. Thus it must be possible to feed say "demospace=user talk" to a template and when it in turn internally feeds that to the namespace detection templates they all should understand "user talk" correctly. That is currently not the case with some of these namespace detection templates, so I am planning to fix that. (Several of the ns templates currently consider an unknown demospace parameter such as "user talk" to mean "other" type, instead of "talk" type.)
3: I want to rename the parameters in {{ talkspace detect}} from for instance "user=" to "user talk=" and so on. Since I think the data parameters should have the same naming as the demospace parameters. That is currently the case for all the ns templates except for {{talkspace detect}}, since it uses "user = User talk page text", instead of "user talk = User talk page text". This will become strange when we have "demospace = user talk" and have to feed the data as "user = User talk page text". (And yes, we can have spaces in parameter names here at Wikipedia!)
4: I want to rename the "default" parameter to "anytalk". Since I think the naming of the "default" parameter is confusing, since it only covers the talk spaces and since in all the other ns templates the "other" parameter is the actual default parameter. So I think that "anytalk" instead is a better name for the "catch all talk-spaces parameter".
5: If we call the "catch all talk-spaces parameter" in {{ talkspace detect}} "anytalk", then we should perhaps consider renaming the "talk" parameter in {{ namespace detect}} to also be called "anytalk". To keep these templates parameter-compatible. But perhaps that is a bit overkill? I'll have to think about that for a while.
6: I want to make the "other" parameter in {{ talkspace detect}} work the same as in the other ns templates. It should mean any namespace not specifically fed, both talk spaces and subject spaces. That is, it should be a catch-all default parameter.
7: If we have a "default/anytalk" parameter, and the "other" parameter is changed to mean all namespaces, then we still would have use for a parameter to only catch all the subject spaces. I suggest we name that one "anysubject" or perhaps simply "subject". The spelling of "anysubject" is slightly awkward, but it is clear. Also consider that we might add the same parameter to {{ namespace detect}} some day, and then "anysubject" is perhaps clearer over there. But "subject" is shorter and nicer, so it's a tough choice, so I'd like some feedback from the rest of you.
I already have working code for all this in the /sandbox of {{talkspace detect}}. Also see the examples in /testcases.
Everyone: Please do not go ahead and do these changes, since all these templates are already deployed and used. So it's a bit tricky to do these changes without breaking any usage out there. You can leave it to me to do these updates, since I know how to do it. And we need to give the people who watch this page some time to think about the parameter naming and discuss it (consensus), before we go ahead.
-- David Göthberg ( talk) 13:05, 18 March 2009 (UTC)
I am thinking of adding the talk space detect functionality to {{ namespace detect}}, thus it could separate all namespaces. That would make {{ talkspace detect}} redundant. To illustrate what I mean, here is what {{namespace detect}} would say at the top of its documentation:
But I am worried this might make the documentation of {{namespace detect}} so bloated that most template programmers will have a problem to understand what this template does.
-- David Göthberg ( talk) 19:52, 19 March 2009 (UTC)
Some hours ago the new namespaces "Book:" and "Book talk:" were added to the English Wikipedia. I have now checked all these namespace detection templates and done updates where needed. I have also checked some of the major templates that are using these templates.
Most of the namespace detection templates were not affected by this change, and those detecting "any talk" space already had generic code that also worked for the new "Book talk:" space. Most of these templates detected "Book:" as type "other" during the transition.
Here is the bugzilla bug about the adding of the new namespaces: bugzilla:21958. And the discussions that led to the adding of these namespaces: Wikipedia:Village pump (proposals)#Namespace for books (will later be moved to /Archive 56 or so) and Wikipedia:Village pump (proposals)/Archive 45#Namespace for books.
-- David Göthberg ( talk) 03:41, 30 December 2009 (UTC)
Can someone please explain why {{ template other}} has such a high transclusion count, as seen here Wikipedia:Database reports/Templates transcluded on the most pages and here Special:WhatLinksHere/Template:Template_other? Is it possible that the transclusion counter is not properly omitting text within the <noinclude> tags? Set theorist ( talk) 22:35, 17 April 2012 (UTC)
Do any of the {{ Namespace detect}} style templates allow detection for a NS and associated TS? I have a template I am building that I want it to be able to pull the
{{lc:{{{1|{{Gender:{{#titleparts:{{BASEPAGENAME}}|1}}|m|f|o}}}}}}}
if in the User: or User_talk: NS, and skip that section otherwise. This feels harder to describe than it actually is. — User:Technical 13 ( C • M • Click to learn how to view this signature as intended ) 19:21, 26 March 2013 (UTC)
I've made a request over at Template talk:Mbox about switching all of the {{ mbox}} family templates, plus the {{ category handler}} template, to use Lua modules. These templates have millions of transclusions, so I would appreciate comments and some more eyes on the code. Please let me know what you think over at the request page. — Mr. Stradivarius ♪ talk ♪ 15:10, 15 October 2013 (UTC)
Is it time to switch to Lua? -- Edgars2007 ( talk/ contribs) 07:29, 18 August 2014 (UTC)
Does not serve draft ns. Sort of nullifies |demospace=
. -
DePiep (
talk) 23:35, 27 December 2014 (UTC)
This
edit request to
Template:Namespace detect showall has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Sync {{ Namespace detect showall/sandbox}} with {{ Namespace detect showall}} please. I'd do it, but it's cascade protected. Headbomb { t · c · p · b} 03:21, 22 August 2018 (UTC)
This
edit request to
Template:Draft other has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please remove the line <noinclude>{{pp-template|small=yes}}</noinclude>
- protection templates are automatically handled by the documentation page. Thanks, --
DannyS712 (
talk) 06:42, 22 March 2019 (UTC)
It was proposed in this section that multiple pages be
renamed and moved.
decision: Links:
current log •
target log
This is template {{
subst:Requested move/end}} |
– For about a decade now, we've been moving templates to names that make more sense in plain English (and keeping shortcuts as redirects), to cut down a little on the intense editorial learning curve. The current name of the template suggests this has something to do with linking to other talk pages, and is just very unintuitive. It's a template for determining if the current page is a talk page or an "other" and displaying different text depending on what the answer is. Updates: I later noticed the parent template {{
Main talk other}}
and have added it; then added more based on comments below. —
SMcCandlish
☏
¢ 😼 23:44, 19 November 2019 (UTC) —Relisting. — Martin (
MSGJ ·
talk) 11:19, 28 November 2019 (UTC)
{{
cn}}
and so on) that are opaque to readers and noob editors, but which resolve to the real and more transparent template names, so it doesn't seem to be problematic. And we have some bots and AWB scripts that bypass such redirects over time (as part of a more substantive edit, per
WP:BOT policy). That said, I don't have any objection to something like the second of the alternative patterns; they're not so long-winded as to be all that non-concise, and they are just a bit more clear. However, wouldn't {{
Template page or other}}
, {{
Testcases page or other}}
, etc. work and be a tad shorter? I don't see the point of repeating "page" when we already know that's the context. The first alternative pattern I don't think works well; "Namespace Template" seems to mean "a template pertaining to namespaces" (and we probably have a category of those). A disambiguation that results in another ambiguity is a failure, as I often say. :-) I suppose that applies to my own initial "minimal change" proposal, since some of the results, like {{
Wikipedia or other}}
aren't very clear. —
SMcCandlish
☏
¢ 😼 23:56, 22 November 2019 (UTC){{
Template page or other}}
, {{
Testcases page or other}}
, etc., as a compromise? —
SMcCandlish
☏
¢ 😼 23:56, 22 November 2019 (UTC)
{{talk or other|...}}
instead of what would be its redirect {{talk other}}
, who cares? It won't change the template functionality, and if someone wants to hard-core
WP:GNOME that much, it's harmless and it saves us the hassle of them inflicting their OCD on something more troublesome, like the exact grammatical structure of hard-fought sentences at
Donald Trump or whatever. :-) By the oppose reasoning you've presented, we should just never, ever rename a template, since some other template somewhere might have been using it at the original name. Yet we rename templates all the time. Anyway, see above about some alternative patterns. —
SMcCandlish
☏
¢ 😼 23:56, 22 November 2019 (UTC)
As a matter of principle, it is best to leave all files with generally valid names at their locations, even if slightly better names may exist." I think the same approach should be taken in template namespace, as with files, these names are not reader-facing. I recall that {{ Main}} was named {{ Main article}} for a time, which resulted in WP:COSMETICBOT drama, which causes real damage to editors' reputations, as so-called cosmetic edits were made to change {{ Main}} → {{ Main article}} and then back again, reminiscent of The Sneetches' Star-On and Star-Off machines. As to the idea of making names make more sense in plain English, that goal should be balanced by the goal of conciseness or brevity – we have template documentation for a reason – one cannot expect the function of the more complex templates to be fully described simply by their names. And "intense editorial learning curve" considerations should be balanced by the fact that we have a large number of editors who are familiar with the current names, who will be inconvenienced by the need to take extra time to look up the function of what will appear to be a new template the first time they see the new name. And I'm not sure who is more "OCD"... the "hard-core" Sneetch gnomes who bypass redirects, or Sylvester McMonkey McBean (the Fix-It-Up Chappie) who leads them to that behavior. – wbm1058 ( talk) 15:23, 30 November 2019 (UTC)
one cannot expect the function of the more complex templates to be fully described simply by their names- go read any programming language best practice for naming convention and you'll see how wrong you here (and Templates are code). Also Trialpears's argument is also not relevant here. Pages get renamed all the time, such is the wikipedia life-cycle. If we stopped moving pages just because we don't want to clean up after (which no one is forcing anyone else to do), then we can close down WP:RM. -- Gonnym ( talk) 15:19, 6 December 2019 (UTC)
The choice of naming conventions can be an enormously controversial issue, with partisans of each holding theirs to be the best and others to be inferior... shorter identifiers may be preferred as more expedient, because they are easier to type... longer identifiers may be disfavored because of visual clutter. It is an open research issue whether some programmers prefer shorter identifiers because they are easier to type, or think up, than longer identifiers, or because in many situations a longer identifier simply clutters the visible code and provides no perceived additional benefit.This isn't that cut-and-dried. I respect that you make valid points, but I just don't think the missing "or" is that big a deal. It seems pretty clearly implied to me. wbm1058 ( talk) 04:25, 7 December 2019 (UTC)
The focus of RM is discussing article titlesdoesn't mean that mainspace is the only namespace discussed here. WP:RMNOT lists the exceptions. I'm quite aware that templates, modules and project space moves are discussed here, and some of those discussions are worth it; alas, in my opinion, others are unproductive distractions which suck attention from fixing things in mainspace that are actually broken. wbm1058 ( talk) 16:41, 8 December 2019 (UTC)
This
edit request to
Template:Main other has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Security and Intelligence Services (India) to SIS Group Enterprise Kcom2020 ( talk) 11:25, 30 April 2020 (UTC)
{{
Main talk other}}
. Please make your request at the talk page for the article concerned.
Jack Frost (
talk) 13:05, 30 April 2020 (UTC)This
edit request to
Template:Main other has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
A protected template, {{ Main other}}, needs a minor change to the comment. Please modify it as follows:
{{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude>
{{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude>
This
edit request to
Template:Talk other has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
(Please see above.) A protected template, {{ Talk other}}, needs a minor change to the comment. Please modify it as follows:
{{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude>
{{documentation}} </noinclude>
This
edit request to
Template:Main other has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Change Kew College to Kew College Prep as page title Ninadiringer ( talk) 09:53, 26 September 2022 (UTC)
{{
Main talk other}}
. If possible, please make your request at the talk page for the article concerned. If you cannot edit the article's talk page, you can instead make your request at
Wikipedia:Requests for page protection#Current requests for edits to a protected page.
EnIRtpf09b
chat with me 10:32, 26 September 2022 (UTC)The result of the move request was: moved per
request on my talk (
permalink). no consensus. Discussion has been open for over a month. Due to low participation, it is difficult to determine if there is consensus that "Project" is a clear enough synonym for the namespace. (
non-admin closure)
Rotideypoc41352 (
talk ·
contribs) 16:28, 4 January 2023 (UTC) and modified 20:24, 4 January 2023 (UTC)
– The current title is rather, well, Wikipedia-centric. 🙃 Especially given that these templates are likely to end up on other wikis by way of template imports, the name "Wikipedia other" is unclear and confusing; the generic "Project other" is less so. 「 ディノ奴 千?!」 ☎ Dinoguy1000 01:24, 29 November 2022 (UTC) — Relisting. GeoffreyT2000 ( talk) 05:07, 8 December 2022 (UTC) — Relisting. echidnaLives - talk - edits 06:21, 2 January 2023 (UTC)
[[Project:RM]]
:
Project:RM.
wbm1058 (
talk) 03:45, 30 December 2022 (UTC)Could someone add to the {{ Namespace detect/doc}} what it returns? That is, what is the result of its detection? Preferably, and expected, in the first line. Options can go in second paragraph.
I had to read the doc for this, but did not succeed nor did my test are test results clear. Also, not clear what mainspace effect is. Opening line "This is the {{ Namespace detect}} meta-template." is not needed. DePiep ( talk) 08:31, 26 February 2023 (UTC)
{{
namespace detect|template=This is used on a template page|talk=This is used on a talk page|other=This is used on another page}}
, when used on this page, returns This is used on a talk page. --
Redrose64 🌹 (
talk) 09:49, 26 February 2023 (UTC)
This
edit request to
Template:Draft other has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
A protected page, Template:Draft other , needs a minor update. Please change its ending lines:
{{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude>
{{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude>
{{documentation}} </noinclude>
Hello! Does this template work with aliases? On arywiki, it seems that {{ User other}} doesn't detect if the namespace is an alias (we have a technical issue that makes some old user pages appear with the old namespace string, which was kept as an alias, instead of the new one). Ideophagous ( talk) 12:14, 23 December 2023 (UTC)
This is {{user other|User|another}} namespace
| {{#ifeq:{{NAMESPACE}}|{{ns:User}}
{{ns:}}
parser function which localises it to whatever has been set up as the non-English name for the namespace. In other words,
this edit shouldn't have been necessary. --
Redrose64 🦌 (
talk) 00:04, 25 December 2023 (UTC)
{{ns:User}}
only returns a single value which is the main string of the namespace, not the aliases, which is consistent with the usage of switch
.
Ideophagous (
talk) 08:30, 25 December 2023 (UTC)
Categories | ||||
|
To help centralise discussions and keep related topics together, the talk pages of its sister templates, such as {{ main other}} and {{ file other}}, redirect here. |
Template:Main talk other is permanently
protected from editing because it is a
heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by
consensus, editors may use {{
edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's
documentation to add usage notes or
categories.
Any contributor may edit the template's sandbox. This template does not have a testcases subpage. You can create the testcases subpage here. |
Text and/or other creative content from this version of Template:Main_other was copied or moved into incubator:Template:Wp/nod/main_other with this edit. The former page's history now serves to provide attribution for that content in the latter page, and it must not be deleted as long as the latter page exists. |
Archive 1 (2008 March - ) |
For future reference and so I can link people to an example:
I have just discovered that some of the things we use {{
main talk other}} for can be done in CSS only. MediaWiki sets the
namespace number as a class in the <body>
tag for the rendered pages. Thus we can use CSS to detect the namespace and show different looks on boxes.
Such CSS code has to be added as classes in for instance
MediaWiki:Common.css, it can not be added as style=""
parameters in page code. Below is a code example showing how to do it. If you want to test it you need to copy the CSS code to
your own monobook.css.
/* Testing namespace detection. */
.davidbox { /* Any namespace */
width: 80%;
margin: 0 auto 1em auto;
padding: .2em;
border: 1px solid #aaa; /* Other space colours */
background: #f9f9f9;
}
.ns-0 .davidbox { /* Main (article) space */
border: 1px solid #aaa; /* Ambox colours */
border-left: 10px solid #1e90ff;
background: #fbfbfb;
}
.ns-1 .davidbox,
.ns-3 .davidbox,
.ns-5 .davidbox,
.ns-7 .davidbox,
.ns-9 .davidbox,
.ns-11 .davidbox,
.ns-13 .davidbox,
.ns-15 .davidbox,
.ns-101 .davidbox { /* Any talk space */
border: 1px solid #c0c090; /* Brown talk space colours */
background: #f8eaba;
}
And here is a small table that uses the namespace detecting CSS code above:
<table class="davidbox">
<tr><td>Testing the davidbox namespace detection.
</table>
And here is how it renders:
Testing the davidbox namespace detection. |
If you haven't installed the CSS code it won't look like much. But with the CSS code it will render as an ambox when on article pages, as a brown talk page message box when on any talk page and as a normal grey messagebox when on any other kind of page.
Neat, isn't it?
-- David Göthberg ( talk) 22:06, 12 April 2008 (UTC)
What is the reason for using these templates? Why not just use the traditional method of directly using parser functions? --- RockMFR 16:38, 7 July 2008 (UTC)
I have removed the "return namespace name" function from all these namespace detection templates. Since it is not used, not needed and it causes problems in some situations.
That is, I removed the code that returned the name of the namespace when these templates were used without any parameters. (Or with all parameters empty.) These templates now instead return an empty string (renders nothing) in this case. Before I removed the function I checked that no template or page was using these templates in that way.
-- David Göthberg ( talk) 13:06, 12 July 2008 (UTC)
I'm rather surprised you haven't done anything like this yet (that I can see), I've been kicking the idea around for awhile now of a template to automate the process of determining if a given page is a base page or a subpage - this would be very useful in userboxes, where often no such detection is used before categorizing pages the userbox is transcluded onto. Any thoughts? — Dino guy 1000 18:59, 22 October 2008 (UTC)
{{basepage subpage | Basepage text. | Subpage text. | demospace = base / sub }}
#switch
anyways, right? I actually would have gone and coded up a sample myself, but I wasn't really clear on how to do the demospace parameter (although I suppose I could have just looked off of this template). One last thought, it would be interesting if the template could detect what level of subpage it's transcluded onto, but of course I don't see any real use for such a feature, and it's not even possible using just MediaWiki markup, ParserFunctions, and magic words AFAIK, so it's more me as a programmer thinking of a programming challenge. ^_^;; —
Dino
guy
1000 17:39, 23 October 2008 (UTC){{#titleparts:}}
parser function. It is a little known but very powerful parser function. I have become pretty adept at using that one since I coded up the {{
editnotice loader}} some week ago. If we have a need for multiple subpage levels then I know how we can have a nice syntax for how to feed the parameters to the {{
basepage subpage}} template:{{basepage subpage | 1 = Basepage text. | 2 = Subpage text, any level. | demospace = basepage / subpage / subsubpage }} {{basepage subpage | 1 = Basepage text. | 2 = Subpage text, first level. | 3 = <!-- Empty but defined parameter, means empty subsub level. --> | demospace = basepage / subpage / subsubpage }} {{basepage subpage | 1 = Basepage text. | 2 = Subpage text, first level. | 3 = Subsubpage text, and for any level below that. | demospace = basepage / subpage / subsubpage }}
#titleparts:
before (even though I saw {{
editnotice loader}} yesterday)! I'll have to play around with it some time. As for multiple param values, that is true, isn't it? In that case, I don't see the harm in using "basepage"/"subpage" in full. As for showall, all I can say is... yikes... that's almost as scary as the parameter lists for all the cite templates! BTW, for another case in which {{
basepage subpage}} would be useful, I just finished creating
documentation for {{
Infobox animanga/Header}} that is meant to be transcluded both onto the template and onto the
central documentation page, which involved basepage/subpage detection to conditionally transclude categories and interwikis, as well as to control the display of a message (clone of the "This documentation is transcluded from" line from {{
documentation}}, vs. a {{
notice}} about how documentation for the other components can be found). It was hard enough at first, but now that it's worked out, it should be fairly simple to do this for all the other components (although I'm
awaiting comments on it ATM). —
Dino
guy
1000 21:35, 23 October 2008 (UTC){{doc other | Text for /doc pages. | Text for any other pages, both basepages and subpages. | demospace = doc / other }}
{{if pagename | /doc = Text for /doc pages. | /something = Text for any pagename that ends in "/something". | other = Text for any other pages, both basepages and subpages. | demospace = ... }}
{{if pagename | /doc = Text for /doc pages. | /something = Text for any pagename that ends in "/something". | basepage = Text for any basepage. | subpage = Text for any subpage. | other = Text for any other pages, both basepages and subpages. | demospace = ... }}
{{if pagename | /other = Text for any subpage. | other = Text for any pages. But not for subpages if "/other" was fed. }}
{{template name|basepage=text|subpage=different text}}
usage. Other than that, my only thought is what if you *want* more than one parameter to display its contents (e.g. you have text that should be displayed on all subpages, but you have another message that should be displayed on a specific subpage, in addition to the specific message)? I suppose in such a case, you could just duplicate the generic message in the parameter for the specific subpage, though. And what about the backslash? Would that be required, and what would happen if it was omitted? (and one last thought, since you seem like you might know, could you explain on my talkpage how substitution detection works? I've tried to follow the code for it in templates, but can't quite figure it out (not that I've tried very hard =P )) —
Dino
guy
1000 17:46, 25 October 2008 (UTC){{if pagename | subpage = Text for any subpage. }}{{if pagename | /doc = Text for /doc pages. }}
So DG, have you gotten any time to poke at this yet? *is still caught slightly off-guard whenever David is called "DG"* — Dino guy 1000 21:18, 15 December 2008 (UTC)
I need a another language version of this Template, and I need the source code. What should I do now? -- Gantulgaas ( talk) 12:26, 28 October 2008 (UTC)
When will the template be moved to Template:File other? -- Joshua Issac ( talk) 14:53, 14 December 2008 (UTC)
Where does the last line of this template come from?
--Gerson75 (talk) 23:24, 23 December 2008 (UTC)copyright:gerson chicarelli 2008
...and who is Gerson Chicarelli, why does s/he holds a copyright? Or, more likely: how to stop this weirdo, as its name shows up on a few different places as well... 88.217.39.117 ( talk) 14:14, 28 January 2009 (UTC)
This message is mostly for Hornoir, since I want to make major changes to the {{ talkspace detect}} template he created. But ideas and comments from anyone else is of course always welcome.
Last month Hornoir created the {{ talkspace detect}} template with similar functionality as the {{ namespace detect}} template, but with the purpose of separating different talk spaces instead of different subject spaces. ("Subject space" is MediaWiki jargon for all the non-talk spaces.) I think he choose a very good name for it, and we probably need such a template. But I want to do a major rework of it so it becomes compatible with the other namespace detection templates.
1: I want to add a "demonspace" parameter, since that is one of the most useful features in the other namespace detection templates. That means when we build other templates with them we can easily test and demonstrate how those templates will behave when in different namespaces, already when doing testing in a /testcases subpage. And we can demonstrate their different looks in their template documentation.
2: The demospace parameter needs to be fully parameter compatible with the other namespace detection templates. Since some templates out there use more than one of the namespace detection templates at the same time. A single template might use say {{ main other}}, {{ talk other}} and {{ talkspace detect}} at the same time. Thus it must be possible to feed say "demospace=user talk" to a template and when it in turn internally feeds that to the namespace detection templates they all should understand "user talk" correctly. That is currently not the case with some of these namespace detection templates, so I am planning to fix that. (Several of the ns templates currently consider an unknown demospace parameter such as "user talk" to mean "other" type, instead of "talk" type.)
3: I want to rename the parameters in {{ talkspace detect}} from for instance "user=" to "user talk=" and so on. Since I think the data parameters should have the same naming as the demospace parameters. That is currently the case for all the ns templates except for {{talkspace detect}}, since it uses "user = User talk page text", instead of "user talk = User talk page text". This will become strange when we have "demospace = user talk" and have to feed the data as "user = User talk page text". (And yes, we can have spaces in parameter names here at Wikipedia!)
4: I want to rename the "default" parameter to "anytalk". Since I think the naming of the "default" parameter is confusing, since it only covers the talk spaces and since in all the other ns templates the "other" parameter is the actual default parameter. So I think that "anytalk" instead is a better name for the "catch all talk-spaces parameter".
5: If we call the "catch all talk-spaces parameter" in {{ talkspace detect}} "anytalk", then we should perhaps consider renaming the "talk" parameter in {{ namespace detect}} to also be called "anytalk". To keep these templates parameter-compatible. But perhaps that is a bit overkill? I'll have to think about that for a while.
6: I want to make the "other" parameter in {{ talkspace detect}} work the same as in the other ns templates. It should mean any namespace not specifically fed, both talk spaces and subject spaces. That is, it should be a catch-all default parameter.
7: If we have a "default/anytalk" parameter, and the "other" parameter is changed to mean all namespaces, then we still would have use for a parameter to only catch all the subject spaces. I suggest we name that one "anysubject" or perhaps simply "subject". The spelling of "anysubject" is slightly awkward, but it is clear. Also consider that we might add the same parameter to {{ namespace detect}} some day, and then "anysubject" is perhaps clearer over there. But "subject" is shorter and nicer, so it's a tough choice, so I'd like some feedback from the rest of you.
I already have working code for all this in the /sandbox of {{talkspace detect}}. Also see the examples in /testcases.
Everyone: Please do not go ahead and do these changes, since all these templates are already deployed and used. So it's a bit tricky to do these changes without breaking any usage out there. You can leave it to me to do these updates, since I know how to do it. And we need to give the people who watch this page some time to think about the parameter naming and discuss it (consensus), before we go ahead.
-- David Göthberg ( talk) 13:05, 18 March 2009 (UTC)
I am thinking of adding the talk space detect functionality to {{ namespace detect}}, thus it could separate all namespaces. That would make {{ talkspace detect}} redundant. To illustrate what I mean, here is what {{namespace detect}} would say at the top of its documentation:
But I am worried this might make the documentation of {{namespace detect}} so bloated that most template programmers will have a problem to understand what this template does.
-- David Göthberg ( talk) 19:52, 19 March 2009 (UTC)
Some hours ago the new namespaces "Book:" and "Book talk:" were added to the English Wikipedia. I have now checked all these namespace detection templates and done updates where needed. I have also checked some of the major templates that are using these templates.
Most of the namespace detection templates were not affected by this change, and those detecting "any talk" space already had generic code that also worked for the new "Book talk:" space. Most of these templates detected "Book:" as type "other" during the transition.
Here is the bugzilla bug about the adding of the new namespaces: bugzilla:21958. And the discussions that led to the adding of these namespaces: Wikipedia:Village pump (proposals)#Namespace for books (will later be moved to /Archive 56 or so) and Wikipedia:Village pump (proposals)/Archive 45#Namespace for books.
-- David Göthberg ( talk) 03:41, 30 December 2009 (UTC)
Can someone please explain why {{ template other}} has such a high transclusion count, as seen here Wikipedia:Database reports/Templates transcluded on the most pages and here Special:WhatLinksHere/Template:Template_other? Is it possible that the transclusion counter is not properly omitting text within the <noinclude> tags? Set theorist ( talk) 22:35, 17 April 2012 (UTC)
Do any of the {{ Namespace detect}} style templates allow detection for a NS and associated TS? I have a template I am building that I want it to be able to pull the
{{lc:{{{1|{{Gender:{{#titleparts:{{BASEPAGENAME}}|1}}|m|f|o}}}}}}}
if in the User: or User_talk: NS, and skip that section otherwise. This feels harder to describe than it actually is. — User:Technical 13 ( C • M • Click to learn how to view this signature as intended ) 19:21, 26 March 2013 (UTC)
I've made a request over at Template talk:Mbox about switching all of the {{ mbox}} family templates, plus the {{ category handler}} template, to use Lua modules. These templates have millions of transclusions, so I would appreciate comments and some more eyes on the code. Please let me know what you think over at the request page. — Mr. Stradivarius ♪ talk ♪ 15:10, 15 October 2013 (UTC)
Is it time to switch to Lua? -- Edgars2007 ( talk/ contribs) 07:29, 18 August 2014 (UTC)
Does not serve draft ns. Sort of nullifies |demospace=
. -
DePiep (
talk) 23:35, 27 December 2014 (UTC)
This
edit request to
Template:Namespace detect showall has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Sync {{ Namespace detect showall/sandbox}} with {{ Namespace detect showall}} please. I'd do it, but it's cascade protected. Headbomb { t · c · p · b} 03:21, 22 August 2018 (UTC)
This
edit request to
Template:Draft other has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please remove the line <noinclude>{{pp-template|small=yes}}</noinclude>
- protection templates are automatically handled by the documentation page. Thanks, --
DannyS712 (
talk) 06:42, 22 March 2019 (UTC)
It was proposed in this section that multiple pages be
renamed and moved.
decision: Links:
current log •
target log
This is template {{
subst:Requested move/end}} |
– For about a decade now, we've been moving templates to names that make more sense in plain English (and keeping shortcuts as redirects), to cut down a little on the intense editorial learning curve. The current name of the template suggests this has something to do with linking to other talk pages, and is just very unintuitive. It's a template for determining if the current page is a talk page or an "other" and displaying different text depending on what the answer is. Updates: I later noticed the parent template {{
Main talk other}}
and have added it; then added more based on comments below. —
SMcCandlish
☏
¢ 😼 23:44, 19 November 2019 (UTC) —Relisting. — Martin (
MSGJ ·
talk) 11:19, 28 November 2019 (UTC)
{{
cn}}
and so on) that are opaque to readers and noob editors, but which resolve to the real and more transparent template names, so it doesn't seem to be problematic. And we have some bots and AWB scripts that bypass such redirects over time (as part of a more substantive edit, per
WP:BOT policy). That said, I don't have any objection to something like the second of the alternative patterns; they're not so long-winded as to be all that non-concise, and they are just a bit more clear. However, wouldn't {{
Template page or other}}
, {{
Testcases page or other}}
, etc. work and be a tad shorter? I don't see the point of repeating "page" when we already know that's the context. The first alternative pattern I don't think works well; "Namespace Template" seems to mean "a template pertaining to namespaces" (and we probably have a category of those). A disambiguation that results in another ambiguity is a failure, as I often say. :-) I suppose that applies to my own initial "minimal change" proposal, since some of the results, like {{
Wikipedia or other}}
aren't very clear. —
SMcCandlish
☏
¢ 😼 23:56, 22 November 2019 (UTC){{
Template page or other}}
, {{
Testcases page or other}}
, etc., as a compromise? —
SMcCandlish
☏
¢ 😼 23:56, 22 November 2019 (UTC)
{{talk or other|...}}
instead of what would be its redirect {{talk other}}
, who cares? It won't change the template functionality, and if someone wants to hard-core
WP:GNOME that much, it's harmless and it saves us the hassle of them inflicting their OCD on something more troublesome, like the exact grammatical structure of hard-fought sentences at
Donald Trump or whatever. :-) By the oppose reasoning you've presented, we should just never, ever rename a template, since some other template somewhere might have been using it at the original name. Yet we rename templates all the time. Anyway, see above about some alternative patterns. —
SMcCandlish
☏
¢ 😼 23:56, 22 November 2019 (UTC)
As a matter of principle, it is best to leave all files with generally valid names at their locations, even if slightly better names may exist." I think the same approach should be taken in template namespace, as with files, these names are not reader-facing. I recall that {{ Main}} was named {{ Main article}} for a time, which resulted in WP:COSMETICBOT drama, which causes real damage to editors' reputations, as so-called cosmetic edits were made to change {{ Main}} → {{ Main article}} and then back again, reminiscent of The Sneetches' Star-On and Star-Off machines. As to the idea of making names make more sense in plain English, that goal should be balanced by the goal of conciseness or brevity – we have template documentation for a reason – one cannot expect the function of the more complex templates to be fully described simply by their names. And "intense editorial learning curve" considerations should be balanced by the fact that we have a large number of editors who are familiar with the current names, who will be inconvenienced by the need to take extra time to look up the function of what will appear to be a new template the first time they see the new name. And I'm not sure who is more "OCD"... the "hard-core" Sneetch gnomes who bypass redirects, or Sylvester McMonkey McBean (the Fix-It-Up Chappie) who leads them to that behavior. – wbm1058 ( talk) 15:23, 30 November 2019 (UTC)
one cannot expect the function of the more complex templates to be fully described simply by their names- go read any programming language best practice for naming convention and you'll see how wrong you here (and Templates are code). Also Trialpears's argument is also not relevant here. Pages get renamed all the time, such is the wikipedia life-cycle. If we stopped moving pages just because we don't want to clean up after (which no one is forcing anyone else to do), then we can close down WP:RM. -- Gonnym ( talk) 15:19, 6 December 2019 (UTC)
The choice of naming conventions can be an enormously controversial issue, with partisans of each holding theirs to be the best and others to be inferior... shorter identifiers may be preferred as more expedient, because they are easier to type... longer identifiers may be disfavored because of visual clutter. It is an open research issue whether some programmers prefer shorter identifiers because they are easier to type, or think up, than longer identifiers, or because in many situations a longer identifier simply clutters the visible code and provides no perceived additional benefit.This isn't that cut-and-dried. I respect that you make valid points, but I just don't think the missing "or" is that big a deal. It seems pretty clearly implied to me. wbm1058 ( talk) 04:25, 7 December 2019 (UTC)
The focus of RM is discussing article titlesdoesn't mean that mainspace is the only namespace discussed here. WP:RMNOT lists the exceptions. I'm quite aware that templates, modules and project space moves are discussed here, and some of those discussions are worth it; alas, in my opinion, others are unproductive distractions which suck attention from fixing things in mainspace that are actually broken. wbm1058 ( talk) 16:41, 8 December 2019 (UTC)
This
edit request to
Template:Main other has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Security and Intelligence Services (India) to SIS Group Enterprise Kcom2020 ( talk) 11:25, 30 April 2020 (UTC)
{{
Main talk other}}
. Please make your request at the talk page for the article concerned.
Jack Frost (
talk) 13:05, 30 April 2020 (UTC)This
edit request to
Template:Main other has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
A protected template, {{ Main other}}, needs a minor change to the comment. Please modify it as follows:
{{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude>
{{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude>
This
edit request to
Template:Talk other has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
(Please see above.) A protected template, {{ Talk other}}, needs a minor change to the comment. Please modify it as follows:
{{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude>
{{documentation}} </noinclude>
This
edit request to
Template:Main other has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Change Kew College to Kew College Prep as page title Ninadiringer ( talk) 09:53, 26 September 2022 (UTC)
{{
Main talk other}}
. If possible, please make your request at the talk page for the article concerned. If you cannot edit the article's talk page, you can instead make your request at
Wikipedia:Requests for page protection#Current requests for edits to a protected page.
EnIRtpf09b
chat with me 10:32, 26 September 2022 (UTC)The result of the move request was: moved per
request on my talk (
permalink). no consensus. Discussion has been open for over a month. Due to low participation, it is difficult to determine if there is consensus that "Project" is a clear enough synonym for the namespace. (
non-admin closure)
Rotideypoc41352 (
talk ·
contribs) 16:28, 4 January 2023 (UTC) and modified 20:24, 4 January 2023 (UTC)
– The current title is rather, well, Wikipedia-centric. 🙃 Especially given that these templates are likely to end up on other wikis by way of template imports, the name "Wikipedia other" is unclear and confusing; the generic "Project other" is less so. 「 ディノ奴 千?!」 ☎ Dinoguy1000 01:24, 29 November 2022 (UTC) — Relisting. GeoffreyT2000 ( talk) 05:07, 8 December 2022 (UTC) — Relisting. echidnaLives - talk - edits 06:21, 2 January 2023 (UTC)
[[Project:RM]]
:
Project:RM.
wbm1058 (
talk) 03:45, 30 December 2022 (UTC)Could someone add to the {{ Namespace detect/doc}} what it returns? That is, what is the result of its detection? Preferably, and expected, in the first line. Options can go in second paragraph.
I had to read the doc for this, but did not succeed nor did my test are test results clear. Also, not clear what mainspace effect is. Opening line "This is the {{ Namespace detect}} meta-template." is not needed. DePiep ( talk) 08:31, 26 February 2023 (UTC)
{{
namespace detect|template=This is used on a template page|talk=This is used on a talk page|other=This is used on another page}}
, when used on this page, returns This is used on a talk page. --
Redrose64 🌹 (
talk) 09:49, 26 February 2023 (UTC)
This
edit request to
Template:Draft other has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
A protected page, Template:Draft other , needs a minor update. Please change its ending lines:
{{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude>
{{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude>
{{documentation}} </noinclude>
Hello! Does this template work with aliases? On arywiki, it seems that {{ User other}} doesn't detect if the namespace is an alias (we have a technical issue that makes some old user pages appear with the old namespace string, which was kept as an alias, instead of the new one). Ideophagous ( talk) 12:14, 23 December 2023 (UTC)
This is {{user other|User|another}} namespace
| {{#ifeq:{{NAMESPACE}}|{{ns:User}}
{{ns:}}
parser function which localises it to whatever has been set up as the non-English name for the namespace. In other words,
this edit shouldn't have been necessary. --
Redrose64 🦌 (
talk) 00:04, 25 December 2023 (UTC)
{{ns:User}}
only returns a single value which is the main string of the namespace, not the aliases, which is consistent with the usage of switch
.
Ideophagous (
talk) 08:30, 25 December 2023 (UTC)