Knowledgebase

How to display messages on the forms for editing and creating pages in MediaWiki

In MediaWiki you can specify messages or notices to be shown at the top of the forms for editing and creating pages. These are not to be confused with the general site notice that can be displayed at the top of the site and that's managed with different options. For information on the site notice check out the article on how to display and manage a site notice in MediaWiki.

You can change and edit any of the interface messages and text displayed on the site. For more information on how to do this check out the article on how to edit the default interface text in MediaWiki. In this article we'll concentrate on the messages that can be displayed on edit forms since by default there are no such messages defined, and if you don't know that pages for managing these messages exist and what their names are, it's more difficult to find them.

As any other interface message, the messages shown on the forms for editing and creating pages are managed with corresponding pages in the MediaWiki namespace (e.g. MediaWiki:Talkpagetext). This means that to set and change a message you need to edit its corresponding page and for the content of the page type the message as you want it to appear on edit/creation forms. These messages are displayed above the built-in text editor on the edit form.

Here's a list of such pages:

MediaWiki:Editnotice-ID - this is not a single page; it stands for a bunch of pages. In the actual name of a page ID has to be replaced with the ID number of the namespace which you want to be affected. The messages typed on that page will be displayed under the page title of the edit forms of all pages from that namespace. For example, the ID number of the Main namespace is 0, and so if you want the edit forms of all pages from the Main namespace to be affected (these are all articles), you have to open the page MediaWiki:Editnotice-0, edit it and type the message as its content. If, for instance, you type the message on the page MediaWiki:Editnotice-2, then the edit forms of all pages from the User namespace will be affected (these are the personal pages of users).

You can use the search function to find and open a page for setting a message, or just add its name to the base URL of your site (e.g. yourdomain.com/index.php/MediaWiki:Editnotice-2).

For a list of the default namespaces and their ID numbers check out the reference list of default MediaWiki namespaces.

MediaWiki:Editnotice-ID-Page Title - with these pages you can add a message to the edit form of a specific page. You have to replace ID with the ID number of the namespace to which the page belongs, and Page Title has to be replaced with the actual name of the page. For example, if the page is an article in the Main namespace (it has the ID 0), and its name is Example Page, then you can add a message on the edit form of that page by specifying it on the page MediaWiki:Editnotice-0-Example Page. The message will not be shown on the edit form of the other pages in the Main namespace.

MediaWiki:Talkpagetext - this is a single page that affects the pages from all namespaces that contain discussion/talk pages. So, for example, the message that you type on MediaWiki:Talkpagetext will be shown on the edit forms of discussion pages associated with the articles, discussion pages associated with the personal user pages, etc. For each default namespace there's a corresponding Talk namespace that contains its discussion pages. So MediaWiki:Talkpagetext is for specifying a message to be shown on all talk pages.

Note that all be above listed pages from the MediaWiki namespace affect not only the edit forms, but if a page doesn't exist, the message will be displayed on the creation form of that page. For example, if you define a message on MediaWiki:Talkpagetext, and somebody decides to create a discussion page that doesn't exist, the message will be shown on the creation form. You can also specify a message to be explicitly shown only on the forms for creating pages. In fact, there's such a message that comes preconfigured with the application. You can edit it on the following page:

MediaWiki:Newarticletext - unlike the previous pages in the list, this one is already created and contains a preconfigured message that comes with the application. It's shown on the form for creating new pages. If you want to change the message, simply edit the page and change the message.

Another useful thing to keep in mind is that none of the pages from the MediaWiki namespace described above takes precedence over the others in the sense that if you define a few messages using different MediaWiki pages, none of the messages is overwritten; they are all displayed. For example, if you specify a message with MediaWiki:Talkpagetext to be shown on the edit forms of all talk pages, and you also specify a message with MediaWiki:Editnotice-1 to be shown on the edit forms of talk pages associated with articles (1 is the ID of the namespace that contains all talk pages for discussing articles from the Main namespace), then the edit forms of discussion pages for commenting articles will display both messages.

If an edit form meets the conditions for displaying more than one message, the messages are shown one under the other. At the top is shown the most general one defined with MediaWiki:Talkpagetext, under it is shown the message defined for a whole namespace with MediaWiki:Editnotice-ID, and below them is shown the most specific one defined per page with MediaWiki:Editnotice-ID-Page Title.

Links to articles in our knowledge base related to interface messages:

Was this answer helpful?

 Print this Article

Also Read