Difference between revisions of "Help:Tutorials/Templates 101"

From Ballotpedia
< Help:TutorialsRedirect page
Jump to: navigation, search
m
(redirected to help:templates)
 
Line 1: Line 1:
<div style="float:right; margin-top: 0.0em; margin-bottom:3px; background-color: #cee0f2; padding: .2em .6em; font-size: 130%; border:1px solid #A3B1BF;"> '''[[Help:Tutorials|Take me to the tutorials library]]''' <span style="font-size: larger; font-weight: bold;">→</span><div style="margin-top: 0.0em; margin-bottom:3px; background-color: #cee0f2; padding: .2em .6em; font-size: 130%; border:1px solid #A3B1BF;"><div style=float:right>'''Next:''' '''[[Help:Tutorials/How to tell if an article has a template on it|How to tell if an article has a template on it.]]'''</div><span style="font-size: larger; font-weight: bold;">→</span></div>
+
#REDIRECT [[Help:Templates]]
__NOEDITSECTION__
+
{|class="wikitable"
+
|-
+
!style="width:50%"|<font size=5>'''How to find and use a template:'''</font>
+
 
+
 
+
!style="width:50%"|<font size=5>'''Example:'''</font>
+
|
+
|--valign="top"
+
|'''''How templates are used on a wiki:'''''
+
Templates make it easy to '''standardize''' the way some information on the wiki is presented.  An example is the “User Help” information box you see to the right. 
+
 
+
This box is found on many pages in the wiki and the code that makes this box is quite complicated.
+
 
+
By creating a '''template on its own separate named page''', (which becomes the name of the template) this page (User Help) can be automatically inserted on any other page.
+
 
+
 
+
 
+
[[image:Red_down_arrow.JPG|30px|center]]
+
 
+
 
+
'''''How to install a template:'''''
+
 
+
To insert a template into a page, type the name of the template in the edit box, and surround it with double “curly brackets.”  These are sometimes known as braces.
+
+
For example, the Help box here is the result of a very short template name code : 
+
   
+
This is the form:
+
 
+
<nowiki>{{name of template here}}.</nowiki>
+
 
+
This is an example using the template's name:
+
<nowiki>{{help}}</nowiki>
+
 
+
 
+
 
+
 
+
 
+
 
+
[[image:Red_down_arrow.JPG|30px|center]]
+
 
+
 
+
 
+
 
+
 
+
'''''How to view the template’s complicated code:'''''
+
 
+
On the template’s page, “Template:Help” , you will find this code.  This is the code that creates the User Help box.
+
 
+
 
+
However, since it is a template, to get the User Help box, you can simply insert the title “help”, enclosed in double curly brackets in any page’s edit box.  It will look like this in the edit box:  <nowiki>{{help}}</nowiki>
+
 
+
'''IMPORTANT NOTE:'''  If the template page is changed, the changes will show up automatically on any other page that contains the template. So it is best not to change a template unless you are the template creator.
+
 
+
 
+
 
+
|[[Image:Help_info_box.jpg|center]]
+
 
+
 
+
 
+
[[Image:Help template code.jpg |500px|center]]
+
 
+
[[Image:Help_template_page_code.jpg|500px|center]]
+
 
+
|}
+
[[Category:Ballotpedia tutorials]]
+

Latest revision as of 11:11, 28 January 2014