| Line 1: |
Line 1: |
| − | <div style="background-color:#dff; border:solid 1px blue; padding:5px; float:right; width:20em"><small>{{mainpageleft}}</small></div> | + | <div style="background-color:#dff; border:solid 1px blue; padding:5px; float:right; width:20em"><small><small>{{mainpageright}}</small></small></div> |
| | Using templates can be easy or hard, depending on the template. But normally they are easy. | | Using templates can be easy or hard, depending on the template. But normally they are easy. |
| | | | |
| | == '''Before you can attach your own template to any CP page, you will need to submit it for approval at [[Template Submission]].''' == | | == '''Before you can attach your own template to any CP page, you will need to submit it for approval at [[Template Submission]].''' == |
| − |
| |
| − |
| |
| | | | |
| | == Basic instructions == | | == Basic instructions == |
| Line 10: |
Line 8: |
| | A template is simply a page (usually a very brief one) that is inserted into another page. | | A template is simply a page (usually a very brief one) that is inserted into another page. |
| | | | |
| − | For example, the two separate boxes on the [[Main Page]] ("Mainpageleft" and "Mainpageright") are each actually separate pages that are "included" on the Main Page. In fact, they can be included on any page: The "Mainpageleft" page has been included to the right just to demonstrate that point: | + | For example, the two separate boxes on the [[Main Page]] ("Mainpageleft" and "Mainpageright") are each actually separate pages that are "included" on the Main Page. In fact, they can be included on any page: The "Mainpageright" page has been included to the right just to demonstrate that point<ref name="shrunk">The "Mainpageright" and "welcome" templates on this page have been reduced in size to fit better.</ref>: |
| | | | |
| − | Templates are included on a page by typing the page name in double curly brackets. So to include ''this'' page on another page, you could type {{tt|<nowiki>{{help:Using templates}}</nowiki>}}. If, however, the template is in "template" [[namespace]] (i.e. the page name starts with "template:"), then you don't need to include that bit. So to include the "Mainpageleft" page, you would just type {{tt|<nowiki>{{Mainpageleft}}</nowiki>}}. | + | Templates are included on a page by typing the page name in double curly brackets. So to include ''this'' page on another page, you could type {{tt|<nowiki>{{help:Using templates}}</nowiki>}}. If, however, the template is in "template" [[namespace]] (i.e. the page name starts with "template:"), then you don't need to include that bit. So to include the "Mainpageright" page, you would just type {{tt|<nowiki>{{Mainpageright}}</nowiki>}}. |
| | | | |
| | For simple templates, that's all there is to it. | | For simple templates, that's all there is to it. |
| Line 21: |
Line 19: |
| | | | |
| | For example, the ''Welcome'' template that someone might have put on your user talk page has two parameters. One is the name of the user, and the other is the name of the person placing the welcome message. See the example below welcoming The Joker, placed by Batman: | | For example, the ''Welcome'' template that someone might have put on your user talk page has two parameters. One is the name of the user, and the other is the name of the person placing the welcome message. See the example below welcoming The Joker, placed by Batman: |
| − | {{welcome|Joker|sig=from Batman}} | + | <div style="width:65%"><small><small>{{welcome|Joker|sig=from Batman}}</small></small></div> |
| | | | |
| − | (This was included on this page by typing <tt><small><nowiki>{{welcome|Joker|sig=from Batman}}</nowiki></small></tt>.) | + | (This was included on this page by typing <tt><small><nowiki>{{welcome|Joker|sig=from Batman}}</nowiki></small></tt>.<ref name="shrunk" />) |
| | | | |
| | "Pipe" characters (|) separate each parameter. | | "Pipe" characters (|) separate each parameter. |