Help/HowToMakeTemplates
From Plastic Tub
Revision as of 03:45, 2 Nov 2005 Payne (Talk | contribs) ← Go to previous diff |
Current revision Payne (Talk | contribs) edits |
||
Line 1: | Line 1: | ||
- | This page contains directions for creating a standardized template for the [[Plastic Tub:About|Tub]]. If you're looking for general information on creating templates, go to [http://en.wikipedia.org/wiki/Help:A_quick_guide_to_templates Wikipedia's Quick Guide to Templates]. | + | __NOTOC__This page contains directions for creating a standardized template for the [[Plastic Tub:About|Tub]]. If you're looking for general information on creating templates, go to [http://en.wikipedia.org/wiki/Help:A_quick_guide_to_templates Wikipedia's Quick Guide to Templates]. |
- | A "generic" template is saved under [[Template:Sidebar]]. This template establishes a format and accepts two variables, one for the header and one for the text. You can use this generic template to create new templates that will all have a similar appearance. Here are some examples: | + | == How To == |
- | {| border="1" cellpadding="2" cellspacing="0" | + | |
+ | ---- | ||
+ | 1. Go to the page where your template will be saved: <code><nowiki>http://plastictub.vaporslave.com/index.php/Template:NameOfTemplate</nowiki></code> | ||
+ | |||
+ | 2. Paste in some code from one of the examples below and alter your Header, Text, Bullet points, etc. Note that both the Text and Header of the template may be "wikified": | ||
+ | :* Create bullets (<code><nowiki>*</nowiki></code>) and numbered lists (<code><nowiki>#</nowiki></code>). | ||
+ | :* Insert lines (<code><nowiki>----</nowiki></code>). | ||
+ | :* Force line breaks (<code><nowiki><br></nowiki></code>). | ||
+ | :* Use italics (<code><nowiki>''</nowiki></code>''italics''<code><nowiki>''</nowiki></code>) and bold face (<code><nowiki>'''</nowiki></code>'''bf'''<code><nowiki>'''</nowiki></code>). (The Header will automatically be in bold face.) | ||
+ | :* Etc. | ||
+ | |||
+ | 3. Once you've created your template, you can stick in other pages by using the "normal" code for calling up saved templates: | ||
+ | : <code><nowiki>{{NameOfTemplate}}</nowiki></code> or <code><nowiki>{{Template:NameOfTemplate}})</nowiki></code> | ||
+ | |||
+ | == Example # 1 == | ||
+ | ''This is the most common form of templates on the Tub (so far). | ||
+ | ---- | ||
+ | Template Page: http://plastictub.vaporslave.com/index.php/Template:Comics | ||
+ | {| border="1" cellpadding="8" cellspacing="0" | ||
|- | |- | ||
- | ! Code | + | ! Code on Template Page |
+ | ! How To Display the Template | ||
! Appearance | ! Appearance | ||
- | ! | + | |- valign="top" |
- | ! Code | + | | |
+ | <code> | ||
+ | <nowiki>{{Sidebar | Associational Strips and Related Sequentialism |</nowiki><br> | ||
+ | <nowiki>* [[Balloonjaw]]</nowiki><br> | ||
+ | <nowiki>* [[Choco]]</nowiki><br> | ||
+ | <nowiki>* [[Lil' AA]]</nowiki><br> | ||
+ | <nowiki>* [[The Sunday Painters]]</nowiki><br> | ||
+ | <nowiki>}}</nowiki> | ||
+ | </code> | ||
+ | | | ||
+ | <nowiki>{{Template:Comics}}</nowiki><br><br> | ||
+ | Or<br><br> | ||
+ | <nowiki>{{Comics}}</nowiki> | ||
+ | | | ||
+ | {{Comics}} | ||
+ | |} | ||
+ | |||
+ | == Example # 2 == | ||
+ | ''This example shows how to modify the Header.'' | ||
+ | ---- | ||
+ | Template Page: http://plastictub.vaporslave.com/index.php/Template:Augury | ||
+ | {| border="1" cellpadding="8" cellspacing="0" | ||
+ | |- | ||
+ | ! Code on Template Page | ||
+ | ! How To Display the Template | ||
! Appearance | ! Appearance | ||
- | ! | + | |- valign="top" |
- | ! Code | + | | |
+ | <code> | ||
+ | <nowiki>{{Sidebar | '''[[Augury]]'''<br>''Removing the Accident'' |</nowiki><br> | ||
+ | <nowiki>* [[Ear Divining]]</nowiki><br> | ||
+ | <nowiki>* [[Geloscopy]]</nowiki><br> | ||
+ | <nowiki>* [[Geomachy]]</nowiki><br> | ||
+ | <nowiki>* [[Sacrifice]]</nowiki><br> | ||
+ | <nowiki>* [[Titor'd]]</nowiki><br> | ||
+ | <nowiki>* [[Zodiac]]</nowiki><br> | ||
+ | <nowiki>}}</nowiki> | ||
+ | </code> | ||
+ | | | ||
+ | <nowiki>{{Template:Augury}}</nowiki><br><br> | ||
+ | Or<br><br> | ||
+ | <nowiki>{{Augury}}</nowiki> | ||
+ | | | ||
+ | {{Augury}} | ||
+ | |} | ||
+ | |||
+ | == Example # 3 == | ||
+ | ''This example shows how to place some extra information below a line on the bottom of the template.'' | ||
+ | ---- | ||
+ | Template Page: http://plastictub.vaporslave.com/index.php/Template:Places | ||
+ | {| border="1" cellpadding="8" cellspacing="0" | ||
+ | |- | ||
+ | ! Code on Template Page | ||
+ | ! How To Display the Template | ||
! Appearance | ! Appearance | ||
|- valign="top" | |- valign="top" | ||
| | | | ||
- | <nowiki>{{Sidebar</nowiki><br> | + | <code> |
- | <nowiki>| Header |</nowiki><br> | + | <nowiki>{{Sidebar | Notable Locations and Geomantic Loci |</nowiki><br> |
- | <nowiki>Text</nowiki><br> | + | <nowiki>* [[Lambda Land of Gar|Garland, Texas]]</nowiki><br> |
- | <nowiki>}}</nowiki><br> | + | <nowiki>* [[New Mexico]]</nowiki><br> |
+ | <nowiki>* [[New York City]]</nowiki><br> | ||
+ | <nowiki>* [[Minneapolis]]</nowiki><br> | ||
+ | <nowiki>* [[Tampa]]</nowiki><br> | ||
+ | <nowiki>* [[Toulouse]]</nowiki><br> | ||
+ | <nowiki>* [[TerraWee]]</nowiki><br> | ||
+ | <nowiki>* [[San Luis Potosi]]</nowiki><br> | ||
+ | <nowiki>* [[Wee-Wee]]</nowiki><br> | ||
+ | <nowiki>----</nowiki><br> | ||
+ | <nowiki>* [[Geomachy|Geomancy]]</nowiki><br> | ||
+ | <nowiki>}}</nowiki> | ||
+ | </code> | ||
| | | | ||
- | {{Sidebar | Header | | + | <nowiki>{{Template:Places}}</nowiki><br><br> |
- | Text | + | Or<br><br> |
- | }} | + | <nowiki>{{Places}}</nowiki> |
| | | | ||
+ | {{Places}} | ||
+ | |} | ||
+ | |||
+ | == Example # 4 == | ||
+ | ''These generic examples may be helpful if you're feeling confused.'' | ||
+ | ---- | ||
+ | Here are a couple generic examples. Several specific examples from the tub are below. | ||
+ | {| border="1" cellpadding="8" cellspacing="0" | ||
+ | |- | ||
+ | ! General Code | ||
+ | ! General Display | ||
+ | ! | ||
+ | ! Wikified Code | ||
+ | ! Wikified Display | ||
+ | |- valign="top" | ||
| | | | ||
- | <nowiki>{{Sidebar</nowiki><br> | + | <code> |
- | <nowiki>| Header |</nowiki><br> | + | <nowiki>{{Sidebar | Your Header Goes Here|</nowiki><br> |
- | <nowiki>* First Point</nowiki><br> | + | <nowiki>Your Text Goes Here</nowiki><br> |
- | <nowiki>* Second Point</nowiki><br> | + | |
- | <nowiki>* Third Point</nowiki><br> | + | |
<nowiki>}}</nowiki><br> | <nowiki>}}</nowiki><br> | ||
+ | </code> | ||
| | | | ||
- | {{Sidebar | Header | | + | {{Sidebar | Your Header Goes Here | |
- | * First Point | + | Your Text Goes Here |
- | * Second Point | + | |
- | * Third Point | + | |
}} | }} | ||
| | | | ||
+ | <br> | ||
| | | | ||
- | <nowiki>{{Sidebar</nowiki><br> | + | <code> |
- | <nowiki>| Header |</nowiki><br> | + | <nowiki>{{Sidebar | Your Header<br>Goes Here |</nowiki><br> |
- | <nowiki>* First Point</nowiki><br> | + | <nowiki>* First Bullet</nowiki><br> |
- | <nowiki>* Second Point</nowiki><br> | + | <nowiki>* Second Bullet</nowiki><br> |
- | <nowiki>* Third Point</nowiki><br> | + | <nowiki>* Third Bullet</nowiki><br> |
- | <nowiki>* Fourth Point</nowiki><br> | + | |
- | <nowiki>* Fifth Point</nowiki><br> | + | |
<nowiki>----</nowiki><br> | <nowiki>----</nowiki><br> | ||
- | <nowiki>Related Info</nowiki><br> | + | <nowiki>More information</nowiki><br> |
<nowiki>}}</nowiki><br> | <nowiki>}}</nowiki><br> | ||
+ | </code> | ||
| | | | ||
- | {{Sidebar | Header | | + | {{Sidebar | Your Header<br>Goes Here | |
- | * First Point | + | * First Bullet |
- | * Second Point | + | * Second Bullet |
- | * Third Point | + | * Third Bullet |
- | * Fourth Point | + | |
- | * Fifth Point | + | |
---- | ---- | ||
- | Related Info | + | More Information |
}} | }} | ||
|} | |} | ||
- | Note that the page for your new template will be: <nowiki>http://plastictub.vaporslave.com/index.php/Template:NameOfTemplate</nowiki> | ||
- | For example: http://plastictub.vaporslave.com/index.php/Template:Comics | + | == Notes == |
+ | |||
+ | ---- | ||
+ | * For those who care, these directions utilize a "generic" template is saved under [[Template:Sidebar]]. This template establishes a format and accepts two variables, one for the header and one for the text. You can use this generic template to create new templates that will all have a similar appearance. | ||
+ | |||
+ | * The directions above explain how to make and save a template that will be used on multiple pages. If you want to create a template that will just be used on one page (e.g., you want to stick a bio chart onto a personage page), just put the template code (from the examples above) directly onto the page. |
Current revision
This page contains directions for creating a standardized template for the Tub. If you're looking for general information on creating templates, go to Wikipedia's Quick Guide to Templates (http://en.wikipedia.org/wiki/Help:A_quick_guide_to_templates).
How To
1. Go to the page where your template will be saved: http://plastictub.vaporslave.com/index.php/Template:NameOfTemplate
2. Paste in some code from one of the examples below and alter your Header, Text, Bullet points, etc. Note that both the Text and Header of the template may be "wikified":
- Create bullets (
*
) and numbered lists (#
). - Insert lines (
----
). - Force line breaks (
<br>
). - Use italics (
''
italics''
) and bold face ('''
bf'''
). (The Header will automatically be in bold face.) - Etc.
- Create bullets (
3. Once you've created your template, you can stick in other pages by using the "normal" code for calling up saved templates:
-
{{NameOfTemplate}}
or{{Template:NameOfTemplate}})
Example # 1
This is the most common form of templates on the Tub (so far).
Template Page: http://plastictub.vaporslave.com/index.php/Template:Comics
Code on Template Page | How To Display the Template | Appearance | ||
---|---|---|---|---|
|
{{Template:Comics}} |
|
Example # 2
This example shows how to modify the Header.
Template Page: http://plastictub.vaporslave.com/index.php/Template:Augury
Code on Template Page | How To Display the Template | Appearance | ||
---|---|---|---|---|
|
{{Template:Augury}} |
|
Example # 3
This example shows how to place some extra information below a line on the bottom of the template.
Template Page: http://plastictub.vaporslave.com/index.php/Template:Places
Code on Template Page | How To Display the Template | Appearance | ||
---|---|---|---|---|
|
{{Template:Places}} |
|
Example # 4
These generic examples may be helpful if you're feeling confused.
Here are a couple generic examples. Several specific examples from the tub are below.
General Code | General Display | Wikified Code | Wikified Display | |||||
---|---|---|---|---|---|---|---|---|
|
|
|
|
|
Notes
- For those who care, these directions utilize a "generic" template is saved under Template:Sidebar. This template establishes a format and accepts two variables, one for the header and one for the text. You can use this generic template to create new templates that will all have a similar appearance.
- The directions above explain how to make and save a template that will be used on multiple pages. If you want to create a template that will just be used on one page (e.g., you want to stick a bio chart onto a personage page), just put the template code (from the examples above) directly onto the page.