Template:Editnotice load/doc: Difference between revisions
←Created page with '{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> === Usage === This is the WP:Editnotice loader used in Med…' |
Davidgothberg (talk | changes) Extending the doc of this template. |
||
Line 1: | Line 1: | ||
{{ |
{{documentation subpage}} |
||
{{used in system}} |
|||
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> |
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> |
||
This is the {{tl|editnotice load}} template. |
|||
=== Usage === |
|||
This is the [[ |
This template is normally only used by the system, it is the [[Wikipedia:Editnotice|editnotice]] loader used in MediaWiki. It displays the editnotices and the links to them, at the top of pages when editing pages. |
||
=== Technical details === |
|||
This template loads and displays the namespace notice. It also calls the sub-template {{tl|editnotice load/core}}. That sub-template handles the loading of the group and page notices, and the links to them. While this template does parameter preprocessing, thus simplifying the code. |
|||
This template is placed in the main MediaWiki namespace notices named [[MediaWiki:Editnotice-0]], [[MediaWiki:Editnotice-1]] and so on. See [[Wikipedia:Namespace]] for the full list of namespace numbers. Then this template needs no parameter. |
|||
==== View source or edit ==== |
|||
We are planning to make it so the editnotices are also displayed when a user "views the source" of a protected page. (When a non-admin tries to edit a fully protected page, or when an IP-user tries to edit a semi or fully protected page.) Most editnotices have useful information even when just viewing the source of a protected page. But in some cases we want to display different information to users who is just viewing the source of the page. This template will feed "notice action = view" to the editnotices it loads when in view mode. This can be used in editnotices like this: |
|||
<pre> |
|||
{{#ifeq: {{{notice action|}}} | view |
|||
| <!--A non-admin is "viewing the source" of a protected page--> |
|||
| <!--An user with sufficient rights is editing the page--> |
|||
}} |
|||
</pre> |
|||
=== See also === |
=== See also === |
||
* [[Wikipedia:Editnotice]] – About the editnotice system. |
|||
<includeonly> |
<includeonly> |
||
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> |
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> |
||
[[Category:MediaWiki namespace templates]] |
|||
</includeonly> |
</includeonly> |
Revision as of 05:01, 8 January 2010
This is a documentation subpage for Template:Editnotice load. It may contain usage information, categories and other content that is not part of the original template page. |
This template is used in system messages. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid major disruption, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Please discuss changes on the talk page before implementing them. |
This is the {{editnotice load}} template.
This template is normally only used by the system, it is the editnotice loader used in MediaWiki. It displays the editnotices and the links to them, at the top of pages when editing pages.
Technical details
This template loads and displays the namespace notice. It also calls the sub-template {{editnotice load/core}}. That sub-template handles the loading of the group and page notices, and the links to them. While this template does parameter preprocessing, thus simplifying the code.
This template is placed in the main MediaWiki namespace notices named MediaWiki:Editnotice-0, MediaWiki:Editnotice-1 and so on. See Wikipedia:Namespace for the full list of namespace numbers. Then this template needs no parameter.
View source or edit
We are planning to make it so the editnotices are also displayed when a user "views the source" of a protected page. (When a non-admin tries to edit a fully protected page, or when an IP-user tries to edit a semi or fully protected page.) Most editnotices have useful information even when just viewing the source of a protected page. But in some cases we want to display different information to users who is just viewing the source of the page. This template will feed "notice action = view" to the editnotices it loads when in view mode. This can be used in editnotices like this:
{{#ifeq: {{{notice action|}}} | view | <!--A non-admin is "viewing the source" of a protected page--> | <!--An user with sufficient rights is editing the page--> }}
See also
- Wikipedia:Editnotice – About the editnotice system.