Manual:$wgContentNamespaces
名前空間: $wgContentNamespaces | |
---|---|
実際のコンテンツまたは記事を含むと見なされる名前空間 |
|
導入されたバージョン: | 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:
Extension:Popups,
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}}
, 通知[1]
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
.
The set of content namespaces for a wiki can be retrieved via the siteinfo API endpoint, e.g. action=query&meta=siteinfo&siprop=namespaces, and filter for namespaces with "content": true
.
関連項目
- Manual:Using custom namespaces#Content namespaces
- Manual:$wgArticleCountMethod – Sets the method to determine which page is counted as a valid content page.
- Manual:$wgMetaNamespace – 'Meta'/'Project'名前空間の名前を設定する。
- Manual:記事数
- Manual:名前空間
- Manual:構成設定#名前空間
References
- ↑ Page link notifications work for content namespace pages