Open main menu

Changes

1,913 bytes added ,  17:12, 14 May 2020
no edit summary
{{Feature
|image=Namespace MediaWiki.svg
|imgdesc=Namespaces
|title=
}}
{{#set:feature description = Using the namespaces feature of MediaWiki, you can setup areas that segregate content. Although MediaWiki is not a CMS designed for roles and access permissions, it nevertheless can be useful to segregate content in a wiki that should be 'nearby', but not in the same space. }}
{{#set:feature notes = }}
{{#set:feature tests = }}
{{#set:feature examples = setup a 'private' namespace which is access restricted so that only a certain class of user can access that space. Because MediaWiki is not a CMS, pages in the private namespace would still show up in a search. However, the content would only be accessible to the group you set it to. So, you wouldn't use this feature to setup a space reserved for the 'human resources' group, and then draft a 'layoff' announcement because although nobody outside the HR group could read the announcement, it's existence would be knowable. On the other hand, 'status-update' wouldn't give too much of a clue about what the contents were. }}
There is a short list of namespaces that are built into this wiki
[[Special:PrefixIndex]]is a friendly interface to the namespaces. This [{{SERVER}}{{SCRIPTPATH}}/api.php?action=query&meta=siteinfo&siprop=namespaces&formatversion=2 api query] is the machine method for looking at this wiki's namespaces.
You can find out more about them in the [[w:Wikipedia:Namespace]] page.
You can reference a particular namespace in a link using a Compact URI ([[w:CURIE|CURIE]]) syntax
E.g. <nowiki>[[Category:Development]]</nowiki> will link to the page 'Development' inside the Category namespace. Built-in namespaces are also tied to built-in functionality so for example an 'Image' link inserts that image into the page. And the 'Category' namespace is tied to the functionality of tagging an article as belonging to the category. So, to actually '''link''' to the category (or image) you would place a ''':''' (colon) before the prefix. e.g. <nowiki>[[:Category:Development]]</nowiki>
== Interwiki Links Usage ==The [http[MW:BlueSpice|BlueSpice]] distribution uses the [[MW://meta.wikimedia.org/wiki/HelpExtension:Interwiki_linking Interwiki LinksNSFileRepo]] are another use of CURIEs to make it very easy extension to link semi-protect files according to other important/useful websites without so much effortnamespace.
EIn QualityBox, we're interested in creating an extension called Level10 that would allow for editing content in 10 separate namespaces for 10 separate levels of focus.g. <nowiki>[[google The idea is roughly the following:foo]]<# concept - term only - defined in one sentence# marketing - in words most people can understand# user - in words relevant to wiki usage# design /nowiki> will produce a link to layout / interface - how the Google results page for a search for 'foo' like this [[google:foo]] (Note that the Interwiki prefix concept is not case sensitivemanifest, so Google works as well as gOOgle. Lowercase or manipulated in the UI# developer - how the concept is preferred. Note too that related to code or implemented in order to suppress code# test - how the concept can be tested across updates or new feature implementations# demo - where can the display of concept be seen in action# admin - how the namespace concept can be manipulated by a sysop in the linkUI, you'll want to use or console# system - how the concept is implemented at the system component level - dependencies or alternates# architecture - how the concept fits with the pipe syntax overall system architectureViewing content in any level would automatically include links to format the link text: <nowiki>[[google:foo|search for 'foo' on Google]]</nowiki> results in this: [[google:foo|search for 'foo' on Google]]other levels.
There == Alternatives ==An alternative to namespaces is to setup a long list of convenient Interwiki Links available to you (displayed by the Interwiki extension): [[Special:Interwiki]]If you run your "wiki farm" where each group or product, or purpose has it's own mediawiki installationindividual wiki, get the Interwiki extension. It makes it so simple all running on a single software instance to add more short-cuts like 'w' for wikipediareduce administrative overhead.
== See Also ==
[[Interwiki links]]
Directly in the database, you can look at the 'interwiki' table[[Category:Wiki]]<source lang="mysql">SELECT iw_prefix, iw_url FROM interwiki </source>[[Category:Development]][[Category:Database]][[Category:SQL]]