Jump to content

Template talk:When on basepage

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

About ((basepage subpage))

[edit]

This template was the idea of Dinoguy1000. I (David) was working on similar templates so he asked if I could build it. I also added some of my ideas to it. Our old discussion is at Template talk:Main talk other#Basepage-subpage detection template.

This template currently understands three levels: basepage, subpage and subsubpage. If more levels are needed we can easily add them, but I am currently not aware of any need for the subsubsubpage level.

About the parameter naming:

Instead of using "demospace = basepage / subpage / subsubpage" I choose to use the slightly less clear "page = User:Example". The reason is that I am building several other pagename detection and manipulation meta-templates: Using the "page" parameter is more flexible since then all the different pagename handling templates can understand the same parameter, thus making it easy to use several of them at the same time in a template. Since then we can feed the same "page = {{{page|}}}" data to all of them. Thus testing and demonstration of templates built with these meta-templates will be easy. (The namespace-detection templates such as {{main other}} and {{talk other}} are parameter compatible in a similar way, and it has proven very useful.)

For {{basepage subpage}} I think the parameter name "demopage = User:Example" would be more clear. But for some of the other pagename handling templates this parameter will not only be used for demonstration and testing, it will also be used in normal code. So calling it "page" fits better. Using the longer "pagename" would be clearer, but for some of the other templates the name needs to be short so "page" it is.

--David Göthberg (talk) 20:23, 4 November 2009 (UTC)[reply]

Requested move 31 August 2014

[edit]
The following discussion is an archived discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review. No further edits should be made to this section.

The result of the move request was: Moved. (non-admin closure) Sardanaphalus (talk) 08:56, 30 September 2014 (UTC)[reply]



Template:Basepage subpageTemplate:If on basepage Template:When on basepage – Suggest this name as producing code that reads more intuitively, i.e.
{{when on basepage |<!--then do this--> |<!--else do this (because on subpage)--> |<!--else do this (because on sub-subpage)-->}}
Relisted. Jenks24 (talk) 12:36, 11 September 2014 (UTC). Nominator: Sardanaphalus (talk) 11:30, 31 August 2014 (UTC)[reply]

Survey

[edit]
Feel free to state your position on the renaming proposal by beginning a new line in this section with *'''Support''' or *'''Oppose''', then sign your comment with ~~~~. Since polling is not a substitute for discussion, please explain your reasons, taking into account Wikipedia's policy on article titles.
  • Strong feelings: The proposed name would be terribly confusable with {{#if:...}} ParserFunction syntax. The operator overloading of { and } characters in MediaWiki already make template code unneccessarily hard to parse and error-prone. However, we already have {{if pagename}} and {{if pagename multi}}. So, I agree all three should be consistent, but propose renaming to "when" not "if" to avoid confusion with if-testing syntax in ParserFunctions.  — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  02:32, 13 September 2014 (UTC)[reply]
This sounds like a very good idea, so I've amended the request above accordingly and will now post requests for {{if pagename}} and {{if pagename multi}}. Thanks for the suggestion. Sardanaphalus (talk) 16:27, 13 September 2014 (UTC)[reply]

Discussion

[edit]
Any additional comments:

The above discussion is preserved as an archive of a requested move. Please do not modify it. Subsequent comments should be made in a new section on this talk page or in a move review. No further edits should be made to this section.