Difference between revisions of "Project:Using Templates"

From Girlfriend Kari Wiki
Jump to: navigation, search
(Created page with "Templates exist to make creating certain objects or text easier, or for more efficiency when reusing segments or blocks of text. This allows you to create things like message...")
 
m
 
Line 1: Line 1:
 
Templates exist to make creating certain objects or text easier, or for more efficiency when reusing segments or blocks of text. This allows you to create things like message boxes, or info boxes, or just to reuse certain text blocks on different pages of the wiki! For more information about templates, visit [[Project:Templates]].
 
Templates exist to make creating certain objects or text easier, or for more efficiency when reusing segments or blocks of text. This allows you to create things like message boxes, or info boxes, or just to reuse certain text blocks on different pages of the wiki! For more information about templates, visit [[Project:Templates]].
  
Most templates can be invoked by <nowiki>{{TemplateName}}.</nowiki>.
+
Most templates can be invoked by the following:
  
Some templates also have parameters that you can add. If necessary, the parameters will usually have a name which you can see from the documentation. To add appropriate text to the parameters, do the following: <nowiki>{{TemplateName|Parameter1=put text here|Parameter2=put text here}}</nowiki> and so forth if necessary.
+
<code><nowiki>{{TemplateName}}</nowiki></code>
 +
 
 +
Some templates also have parameters that you can add. If necessary, the parameters will usually have a name which you can see from the documentation. To add appropriate text to the parameters, do the following:  
 +
 
 +
<code><nowiki>{{TemplateName|Parameter1=put text here|Parameter2=put text here}}</nowiki></code>
 +
 
 +
You can keep adding parameters as long as the template has more parameters to enter.
  
 
You can also put links into the parameters by doing <nowiki>"Parameter1=[[link to article]]"</nowiki>.
 
You can also put links into the parameters by doing <nowiki>"Parameter1=[[link to article]]"</nowiki>.
Line 13: Line 19:
 
Feel free to play around with templates in the [[Sandbox]] if you'd like.
 
Feel free to play around with templates in the [[Sandbox]] if you'd like.
  
[Category:Help|Using Templates]
+
[[Category:Help|Using Templates]]

Latest revision as of 20:46, 18 March 2015

Templates exist to make creating certain objects or text easier, or for more efficiency when reusing segments or blocks of text. This allows you to create things like message boxes, or info boxes, or just to reuse certain text blocks on different pages of the wiki! For more information about templates, visit Project:Templates.

Most templates can be invoked by the following:

{{TemplateName}}

Some templates also have parameters that you can add. If necessary, the parameters will usually have a name which you can see from the documentation. To add appropriate text to the parameters, do the following:

{{TemplateName|Parameter1=put text here|Parameter2=put text here}}

You can keep adding parameters as long as the template has more parameters to enter.

You can also put links into the parameters by doing "Parameter1=[[link to article]]".

If you view the source code of a template, you can find the parameters by looking for text enclosed by three curly braces, like {{{parameter}}}. The text inside the braces is the parameter name.

For more information on templates, you can visit their respective documentation on the templates, for the ones that have such. Feel free to create templates as necessary. For example, Template:Walkthrough Infobox was created for easier navigation through the Walkthrough pages on Girlfriend Kari.

Feel free to play around with templates in the Sandbox if you'd like.