Handbuch:$wgNamespacesWithSubpages
Namensräume: $wgNamespacesWithSubpages | |
---|---|
Which namespaces should support subpages? |
|
Eingeführt in Version: | Vor 1.1.0 |
Entfernt in Version: | Weiterhin vorhanden |
Erlaubte Werte: | siehe unten |
Standardwert: | siehe unten |
Andere Einstellungen: Alphabetisch | Nach Funktion |
Details
The variable holds an array indicating which namespaces allow sub-pages.
The array is indexed by the numeric namespace ID, and each array value is either false
(no sub-pages) or true
(sub-pages allowed).
A categoryspace (namespace 14) subpage will work like any other category.
Siehe Help:Unterseiten .
Für einen Namensraum aktivieren
- See also Manual:Namespace constants for a list of the
NS_...
codes.
The normal way to enable subpages for a given namespace is to edit the LocalSettings.php
and insert the following:
# Enable subpages in the main namespace
$wgNamespacesWithSubpages[NS_MAIN] = true;
# Enable subpages in the template namespace
$wgNamespacesWithSubpages[NS_TEMPLATE] = true;
# etc.
Für einen Namensraum deaktivieren
Disable subpages in a namespace (where it is enabled by default).
For example NS_TALK
has subpages enabled by default in MediaWiki.
To disable them, set false
:
$wgNamespacesWithSubpages[NS_TALK] = false;
Standardwert
The default of this setting has changed over the years. To be sure which one applies to your wiki check this setting in "DefaultSettings.php".
MediaWiki Version: | ≥ 1.29 |
$wgNamespacesWithSubpages = [
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 => true,
NS_TEMPLATE_TALK => true,
NS_HELP => true,
NS_HELP_TALK => true,
NS_CATEGORY_TALK => true
];
MediaWiki Versions: | 1.21 – 1.28 |
$wgNamespacesWithSubpages = [
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
];
MediaWiki Versions: | 1.16 – 1.20 |
$wgNamespacesWithSubpages = array(
NS_TALK => true,
NS_USER => true,
NS_USER_TALK => true,
NS_PROJECT_TALK => true,
NS_FILE_TALK => true,
NS_MEDIAWIKI => true,
NS_MEDIAWIKI_TALK => true,
NS_TEMPLATE_TALK => true,
NS_HELP_TALK => true,
NS_CATEGORY_TALK => true
);
MediaWiki Versions: | 1.14 – 1.15 |
$wgNamespacesWithSubpages = array(
NS_TALK => true,
NS_USER => true,
NS_USER_TALK => true,
NS_PROJECT_TALK => true,
NS_FILE_TALK => true,
NS_MEDIAWIKI_TALK => true,
NS_TEMPLATE_TALK => true,
NS_HELP_TALK => true,
NS_CATEGORY_TALK => true
);
MediaWiki Versions: | 1.5 – 1.13 |
$wgNamespacesWithSubpages = array(
NS_TALK => true,
NS_USER => true,
NS_USER_TALK => true,
NS_PROJECT_TALK => true,
NS_IMAGE_TALK => true,
NS_MEDIAWIKI_TALK => true,
NS_TEMPLATE_TALK => true,
NS_HELP_TALK => true,
NS_CATEGORY_TALK => true
);