Editing Help:Templates

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
{{WikiHelp}}  {{TOC none}}
 
{{WikiHelp}}  {{TOC none}}
 
Templates are pretty simple to use once you get the hang of it. They insert content to pages without cluttering it, which is useful for repetitive items. Complex templates can be forms which you can easily fill out when following the directions displayed on the template's page.
 
Templates are pretty simple to use once you get the hang of it. They insert content to pages without cluttering it, which is useful for repetitive items. Complex templates can be forms which you can easily fill out when following the directions displayed on the template's page.
[[File:EditingWiki.png|frame|This is how it is when ''editing'' the wiki. Notice the "Templates Used" on the bottom]]
 
  
 
==What are Templates?==
 
==What are Templates?==
*Templates make formatting the wiki easier
+
*Templates are how we format the wiki
 
*They can contain table codes, layouts and plain information which is easy to insert wherever needed
 
*They can contain table codes, layouts and plain information which is easy to insert wherever needed
 
*They add whatever is in the template onto the pages which you place the <code><nowiki>{{Template}}</nowiki></code> tag
 
*They add whatever is in the template onto the pages which you place the <code><nowiki>{{Template}}</nowiki></code> tag
Line 13: Line 12:
 
===How do I use them===
 
===How do I use them===
 
:When you view the template page itself, you will see a '''Template Explanation''' at the bottom of the page which will explain to you what the specific template is for and what commands work with it
 
:When you view the template page itself, you will see a '''Template Explanation''' at the bottom of the page which will explain to you what the specific template is for and what commands work with it
==How can I see what templates are being used?==
+
==Finding the Active Templates==
:You can always find what templates are currently in use on a page when editing.
+
[[File:EditingWiki.png|frame|This is how it is when ''editing'' the wiki. Notice the "Templates Used" on the bottom]]
:*If you are editing a section (instead of entire page at once) all you need to do is press ''"Show Preview"''' and the list of templates will appear if any
+
:You can easily find what templates are being used on a page by editing the page and scrolling to the bottom
:*Just press the link to the template you wish to view, there you should be able to find a guide on how to use the more complex templates
+
:*If you click the template link (not the "edit" link) you will find the template itself and the directions how to use it
:*Be aware that even if only a single template is being used, the tempate list can appear longer. This is because it will also count the templates within the template being used.
+
:*If you are editing a section of page, you will see the Active templates after you preview
==How can I tell if any page is using the template?==
+
:*The list becomes very long sometimes, because it also lists templates that the template is using.
:You can see what pages are using a template the same way as you can see if any page is being linked to
 
:*In the sidebar here on the left you can see a link "What links here"
 
:*When on template pages, it will list what pages are using that very template.
 
 
 
 
 
 
==Editing Templates (only for Advanced contributors)==
 
==Editing Templates (only for Advanced contributors)==
 
:Editing a template is just like editing any other page, but there are certain tags within it that control what content appears only on the template-page itself or when the template is being used. You should not really be messing with the templates themselves unless you are advanced in the wiki coding. '''Remember that you can always "undo" accidents from ''history'''''
 
:Editing a template is just like editing any other page, but there are certain tags within it that control what content appears only on the template-page itself or when the template is being used. You should not really be messing with the templates themselves unless you are advanced in the wiki coding. '''Remember that you can always "undo" accidents from ''history'''''
 
:*Please be careful when editing templates, because it will effect all the pages that use that template.
 
:*Please be careful when editing templates, because it will effect all the pages that use that template.
 
:*Do not mess with the "include" tags, they play a big part in the template functionality.
 
:*Do not mess with the "include" tags, they play a big part in the template functionality.
:*:<code><nowiki><onlyinclude></nowiki></code> = include this on pages
+
:*:<code><nowiki><onlyinclude></nowiki></code> <code><nowiki><includeonly></nowiki></code> <code><nowiki><noinclude></nowiki></code>
:*:<code><nowiki><includeonly></nowiki></code> = only include this on pages (does not appear on the template page itself)
 
:*:<code><nowiki><noinclude></nowiki></code> = exclude this from appearing on pages
 
 
{{clear}}
 
{{clear}}
 +
 +
==Using Templates==
 +
{| style="width:70%"
 +
|
 +
{{TemplateExplanation|
 +
On each template's page are explanations for how to use that specific template, in a box like this.
 +
:*Many templates let you add content to it by filling it in the right order within the tag:
 +
::'''example:''' the <code><nowiki>{{yes}}</nowiki></code> is specifically made to be used within table cells (else it looks like plain code).
 +
}}
 +
{| class=wikitable
 +
!colspan=3|Using templates (with <code><nowiki>{{yes}}</nowiki></code> template as example)
 +
|-
 +
!Description !!Code !! Results
 +
|-
 +
|Plain use of template, fills the cell with color and "yes" ||<code><nowiki>{{yes}}</nowiki></code> ||{{yes}}
 +
|-
 +
|Adding text to template, in this case it will replace the default text. ||<code><nowiki>{{yes|usually}}</nowiki></code>|| {{yes|usually}}
 +
|}
 +
:If you would use this template outside of its designated usage (which is within table cells), it turns out looking like this:
 +
:*{{yes}}
 +
 +
 +
|}

Please note that all contributions to Krafties may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Templates used on this page: