Template:Editnotice load: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(eliminate one parser function, allow user space subpages loaded from Template:Editnotices/Page/) |
m (16 revisions imported from wikipedia:Template:Editnotice_load) |
||
(10 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{#if: {{Editnotice load/content |
|||
⚫ | |||
| notice action = {{{notice action|}}} |
|||
⚫ | |||
We unfortunately have to call /content twice so that the editnotice-area and clear elements |
|||
are only output if there is at least one actual edit notice. This ensures the software can determine |
|||
whether or not a page has edit notices (for the API, WikiEditor, VisualEditor and others). And to ensure |
|||
MediaWiki:Editnotice-notext gets shown when appropiate. |
|||
--><div id="editnotice-area" class="editnotice-area mw-parser-output" style="clear: both; width: 100%;">{{Editnotice load/content |
|||
| notice action = {{{notice action|}}} |
|||
⚫ | |||
⚫ | |||
Namespace notice |
|||
-->{{#ifexist:Template:Editnotices/Namespace/{{#if:{{NAMESPACE}}|{{NAMESPACE}}|Main}} |
|||
| <div class="editnotice-namespace"> |
|||
{{Template:Editnotices/Namespace/{{#if:{{NAMESPACE}}|{{NAMESPACE}}|Main}}}} |
|||
</div> |
|||
⚫ | |||
Group notice |
|||
-->{{ #if:{{ns has subpages}} |
|||
| {{#ifexist:Template:Editnotices/Group/{{FULLROOTPAGENAME}} |
|||
| <div class="editnotice-group"> |
|||
{{Template:Editnotices/Group/{{FULLROOTPAGENAME}}}} |
|||
</div> |
|||
}} |
|||
}}<!-- |
|||
Page notice. Load user (talk) rootpage editnotices from user space, rest from Template:Editnotices/Page/ |
|||
-->{{#switch:{{PAGENAME}}:::{{NAMESPACE}} |
|||
| {{BASEPAGENAME}}:::{{ns:User}} | {{BASEPAGENAME}}:::{{ns:User talk}} = |
|||
{{#ifexist:{{FULLPAGENAME}}/Editnotice |
|||
| <div id="editnotice-ns-{{NAMESPACEID}}" class="editnotice-page"> |
|||
{{{{FULLPAGENAME}}/Editnotice}} |
|||
</div> |
|||
}} |
|||
| #default = |
|||
{{#ifexist:Template:Editnotices/Page/{{FULLPAGENAME}} |
|||
| <div class="editnotice-page"> |
|||
{{Template:Editnotices/Page/{{FULLPAGENAME}}}} |
|||
</div> |
|||
}} |
|||
}}<!-- |
|||
⚫ | |||
{{pp-template|small=yes}} |
|||
{{documentation}} |
{{documentation}} |
||
<!-- Add categories and interwikis to the /doc subpage, not here! --> |
|||
</noinclude> |
</noinclude> |