MZMcBride wrote:
Current default:
$wgNamespacesWithSubpages = array( NS_TALK => true, NS_USER => true, NS_USER_TALK => true, NS_PROJECT => true, NS_PROJECT_TALK => true, NS_FILE_TALK => true, NS_MEDIAWIKI => true, NS_MEDIAWIKI_TALK => true, NS_TEMPLATE_TALK => true, NS_HELP => true, NS_HELP_TALK => true, NS_CATEGORY_TALK => true );
Proposed array addition:
NS_MAIN => true,
The more I look at this, the more I wonder why not instead invert the array:
--- $wgNamespacesWithoutSubpages = array( NS_FILE => true, NS_CATEGORY => true ); ---
I don't know why NS_TEMPLATE isn't true by default... isn't using "Template:Foo/doc" for "Template:Foo"'s documentation a common pattern?
Though my real goal is saner default behavior for NS_MAIN and inverting the array would be a larger change than a simple one-liner. Hmmm.
MZMcBride
On 6/25/14, MZMcBride z@mzmcbride.com wrote:
MZMcBride wrote:
Current default:
$wgNamespacesWithSubpages = array( NS_TALK => true, NS_USER => true, NS_USER_TALK => true, NS_PROJECT => true, NS_PROJECT_TALK => true, NS_FILE_TALK => true, NS_MEDIAWIKI => true, NS_MEDIAWIKI_TALK => true, NS_TEMPLATE_TALK => true, NS_HELP => true, NS_HELP_TALK => true, NS_CATEGORY_TALK => true );
Proposed array addition:
NS_MAIN => true,
The more I look at this, the more I wonder why not instead invert the array:
$wgNamespacesWithoutSubpages = array( NS_FILE => true, NS_CATEGORY => true );
I don't know why NS_TEMPLATE isn't true by default... isn't using "Template:Foo/doc" for "Template:Foo"'s documentation a common pattern?
Though my real goal is saner default behavior for NS_MAIN and inverting the array would be a larger change than a simple one-liner. Hmmm.
MZMcBride
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Including NS_TEMPLATE sounds sane. Every so often someone on #mediawiki asks why {{/doc}} includes template:/doc on their wiki instead of template:{{PAGENAME}}/doc like it does on 'pedia.
Making the array inverted does sound like it would make more sense in many ways, but a bigger change. Maybe instead we could have $wgNamespacesHaveSubpagesByDefault to specify what default subpage behaviour is, and then $wgNamespacesWithSubpages[NS_FOO] = true; turns on subpages if they are off by default, and $wgNamespacesWithSubpages[NS_FOO] = false; turns them off if they are on by default (And no entry falls back to $wgNamespacesHaveSubpagesByDefault). It seems sort of like people would want subpages on in new custom namespaces by default too.
--bawolff
wikitech-l@lists.wikimedia.org