We have focused mainly on organizing content rather creating content in your wiki in this article. We assume you should have a few pages in your wiki. As our wiki grows in popularity, the amount of content it hosts will continue to grow so it is important to organize the content in your wiki so that our wiki looks better to our visitors and editing and reviewing content is much easier for our users. If we think of our wiki as a library, it is easy to see why we need to organize our wiki. After all, if you walk into a library with no system for organizing the books, movies, music, periodicals, and others you would find it hard to locate what you are looking for. Likewise, if we have no order in our wiki, then our visitors could find themselves frustrated when trying to find the information they are looking for. If they become too frustrated, they will go elsewhere.
Namespaces are used by MediaWiki to group together pages that have a similar purpose such as Help pages, User profiles, or Talk pages. This is not to be confused with pages that contain similar content. These pages are grouped by categories which we will discuss later in this article. Pages that exist within a namespace in a wiki are noted by the namespace prefix that helps to form the title of the page. For example, if we have a page called Uploading a video file that exists in the Help namespace, it would appear as Help:Uploading a video file. Perhaps you want to create a new page for an upcoming marketing project for your company. This would appear as Project: Marketing project. MediaWiki makes use of 18 built-in namespaces. The odd number namespaces are talk namespaces while even numbered ones represent subject namespaces.
Numerical index | Namespace | Description |
0 | Main | This groups together a majority of the site’s content. There is no namespace prefix for the mainspace. |
1 | Talk | The discussion pages attached to the mainspace pages. |
2 | User | Pages that contain information about users and their history. |
3 | User talk | Used to leave messages to a user. |
4 | Project | Used for information related to the operation and development of the wiki. This is also known as the meta namespace. |
5 | Project talk | Used to discuss project pages. |
6 | File | Stores metadata for files uploaded to the wiki. This includes images, sound, video, and other files accessed through the Media namespace. |
7 | File talk | Used to discuss files and media. |
8 | MediaWiki | Contains system messages and other important content. |
9 | MediaWiki talk | Discussion pages related to the MediaWiki namespace. |
10 | Template | Used to hold templates used in the wiki. |
11 | Template talk | Discussion pages for the various templates used in the wiki. |
12 | Help | Holds help files, how-tos, and other instructions for users. |
13 | Help talk | Used to hold discussions related to the help files. |
14 | Category | Holds information related to the different categories created for the wiki. |
15 | Category talk | Used to hold discussions regarding the wiki’s categories. |
-2 | Media | Used for direct linking to media files [[Media:song.ogg]] rather than the information page. |
-1 | Special | Groups special pages created by MediaWiki itself. |
Talk pages are accessed by clicking on the discussion tab at the top of a page.
The last two namespaces, denoted by the negative sign, are used for pages created by MediaWiki. Users cannot create, delete, or edit any pages in these two namespaces without special extensions. The remaining 16 namespaces are all used for user-created content.
The following screenshot shows the Help namespace for the Joomla! documentation wiki (http://docs.joomla.org/Beginners ):
Content that is housed in many of the namespaces is created on the fly. For instance, when you first register as a user, a new page in the User namespace is created. When you create a Help page, a new page appears in the Help namespace. If you add to the discussion page for an article on your wiki, a new talk page is created. For Main, Project, Template, Help, and Category pages, we can add new pages directly into the namespace.
For example, if our IT department wanted a user manual for a new software package that was just installed, we could create a project page for this. In this instance, we would have to designate the namespace or it would default to a regular article.
When the page has been saved, it will look similar to this:
You may have noticed that while the tab reads project page, the namespace is the title of our wiki. In this example, Floss Pro Populo appears instead of the word Project. As the project page deals with organization of the wiki, it defaults to the wiki’s sitename to represent a project taking place within the wiki itself. This can be changed; however, it is something that should be done by more advanced MediaWiki administrators.
Instead of simply creating a new page, we used the URL to create a new page and included it in a specific namespace. In this example, we created a new Project page explaining the project that will include creating a user manual for a new software package. We also saw that of the 18 namespaces, we can directly create new pages using this method in only five of them. The other 13 namespaces have their pages created by MediaWiki itself when different actions are taken.
If you try to create a page in a namespace that doesn’t exist, it will default to the Main namespace. MediaWiki will not create the new namespace for you.
Namespaces are important because they help keep our pages organized. As an administrator, it is important to know what kind of pages the different namespaces hold so we can find what we are looking for. To make user that you have a solid grasp of namespaces, let’s take a moment to test your knowledge.
I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…
Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…
Once we learn how to deploy an Ubuntu server, how to manage users, and how…
Key-takeaways: Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…
While developing a web application, or setting dynamic pages and meta tags we need to deal with…
Software architecture is one of the most discussed topics in the software industry today, and…