Last modified: 2008-08-06 19:41:58 UTC
Created attachment 5121 [details] Remove code restricting to namespaces with subpages Ok, this is a documented 'feature': they only work on namespaces whith subpages enabled. But there's no reason they shouldn't work on the rest as well. SUBPAGENAME has a well-documented behaviour, its use means you want exactly the subpage, else you would be using {{PAGENAME}} It also causes inconsistencies when moving templates from one wiki to another (eg. bug 15050). PAtch attached which modifying {{SUBPAGENAME[E]}} behaviour, as well as {{BASEPAGENAME[E]}} to keep consistency. The only use on core and svn extensions of those two title functions is to implement these magic words.
{{PAGENAME}} means "return full page name unconditionally", {{SUBPAGENAME}} means "return subpage name if this is a subpage, otherwise return full page name". Some expected behavior is not necessarily going to work if the namespace doesn't support subpages. Not sure this is a good idea -- if you're moving pages to a namespace without subpages, you should either rename the (ex-)subpages to something that doesn't use subpage syntax, or enable subpages in the namespace.
It means that only because that's the way it has been coded. The name is {{SUBPAGENAME}} not {{SUBPAGENAMEIFNSALLOWSTHEM}} ;) Bug 5167 just asks for a magic word to differentiate between page levels.
Either subpages exist in the namespace, or they don't. They need to *not* be broken so pages like [[OS/2]] don't think they're subpages of [[OS]].