手册:$wgContentNamespaces
名字空间: $wgContentNamespaces | |
---|---|
Namespaces which are considered to contain real content, or articles |
|
引进版本: | 1.7.0 (r14738) |
移除版本: | 仍在使用 |
允许的值: | (名字空间索引的数组) |
默认值: | [ NS_MAIN ] |
其他设置: 按首字母排序 | 按功能排序 |
详情
$wgContentNamespaces
exists to allow custom namespaces to be acknowledged as containing useful content for the purpose of the following features:
Special:Random, Special:Statistics, Special:AncientPages, Special:DeadendPages, Special:FewestRevisions, Special:LonelyPages, Special:MostCategories, Special:MostInterwikis, Special:RandomPage, Special:ShortPages,
Special:LongPages, Special:UncategorizedPages, Special:WithoutInterwiki, {{NUMBEROFARTICLES}}
Useful if additional namespaces also contain "content" which should be considered when choosing a random page or generating a count of the number of articles in the wiki. It also serves as the default for $wgExemptFromUserRobotsControl , which means that __NOINDEX__ and __NOFOLLOW__ magic words won't work in these namespaces.
The main namespace is considered a content namespace, as are other namespaces in this array, referenced by index.
示例:
$wgContentNamespaces = [ 0, 12, 112 ];
或
$wgContentNamespaces = [ NS_MAIN, NS_HELP, NS_PROJECT, NS_CUSTOMNAMESPACE ];
This does not control which namespaces the full-text search engine defaults to searching; that must be configured separately using $wgNamespacesToBeSearchedDefault
.
参见
- Manual:Using custom namespaces#Content namespaces
- 手册:$wgArticleCountMethod – Sets the method to determine which page is counted as a valid content page.
- Manual:$wgMetaNamespace – Set the name of the 'Meta'/'Project' namespace.
- 手册:条目总数
- 手册:名字空间
- Manual:Configuration settings#Namespaces