Template:Editcopy: Difference between revisions

From Structorica Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<!-- Define mainpagetitle variable -->
<!-- Define mainpagetitle variable  
{{#vardefine: mainpagetitle | {{#if: {{#pos: {{PAGENAME}} | /}} | {{#sub: {{PAGENAME}} | 0 | {{#pos: {{PAGENAME}} | /}} }} | {{PAGENAME}} }} }}
--> {{#vardefine: mainpagetitle | {{#if: {{#pos: {{PAGENAME}} | /}} | {{#sub: {{PAGENAME}} | 0 | {{#pos: {{PAGENAME}} | /}} }} | {{PAGENAME}} }} }} <!--


{{#if: {{#pos: {{PAGENAME}} | /editcopy}} | <!-- The MessageBox only appears on the /editcopy page, allowing it to be used on the main page to prevent the main page and the editcopy from appearing different
--> {{#if: {{#pos: {{PAGENAME}} | /editcopy}} | <!-- The MessageBox only appears on the /editcopy page, allowing it to be used on the main page to prevent the main page and the editcopy from appearing different
 
--> {{#if: {{{styles_editcopy|}}} | <templatestyles src="{{{styles_editcopy}}}" /> }}<!-- Load custom styles for editcopy page if specified


--> {{MessageBox
--> {{MessageBox
Line 16: Line 14:


<!-- We are on the main page -->
<!-- We are on the main page -->
{{#if: {{{styles_main|}}} | <templatestyles src="{{{styles_main}}}" /> }}<!-- Load custom styles for main page if specified
{{#if: {{{nocat|}}} | | [[Category:Editcopies]]}}
 
}}<!-- End of #ifeq/template --><noinclude>
--> {{#if: {{{nocat|}}} | | [[Category:Editcopies]]}} <!-- Adds to Category:Editcopies unless the nocat parameter is specified
 
--> }} <!-- End of #ifeq/template --><noinclude>
=== Documentation ===
=== Documentation ===
Examples:
Examples:
<syntaxhighlight lang="wikitext">
<syntaxhighlight lang="wikitext">
{{Editcopy
{{Editcopy
     | Page Name
     | Main Page
    | firsttitle = the main page
     | administrators
     | administrators
     | reason = high traffic page
     | reason = because it is a high traffic page and therefore a likely target of vandalism
     }}
    | extratext = See also editcopy pages for related templates.
     }}  
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang="wikitext">
<syntaxhighlight lang="wikitext">
{{Editcopy
__NOTOC__{{#if: {{#pos: {{PAGENAME}} | /editcopy}}
| <templatestyles src=":Structorica_Wiki/styles.css/editcopy" />
| <templatestyles src=":Structorica_Wiki/styles.css" />
}}{{Editcopy
     | Main Page
     | Main Page
     | firsttitle = the main page
     | firsttitle = the main page
Line 37: Line 37:
     | reason = because it is a high traffic page and therefore a likely target of vandalism
     | reason = because it is a high traffic page and therefore a likely target of vandalism
     | extratext = See also editcopy pages for related templates.
     | extratext = See also editcopy pages for related templates.
    | styles_main = Main Page/styles.css
}}
    | styles_editcopy = Main Page/styles.css/editcopy
    }}
</syntaxhighlight>
</syntaxhighlight>



Revision as of 08:01, 15 January 2026

Documentation

Examples:

{{Editcopy
    | Main Page
    | firsttitle = the main page
    | administrators
    | reason = because it is a high traffic page and therefore a likely target of vandalism
    | extratext = See also editcopy pages for related templates.
    }}
__NOTOC__{{#if: {{#pos: {{PAGENAME}} | /editcopy}}
| <templatestyles src=":Structorica_Wiki/styles.css/editcopy" />
| <templatestyles src=":Structorica_Wiki/styles.css" />
}}{{Editcopy
    | Main Page
    | firsttitle = the main page
    | administrators
    | reason = because it is a high traffic page and therefore a likely target of vandalism
    | extratext = See also editcopy pages for related templates.
}}