Difference between revisions of "Help:Templates"
Jump to navigation
Jump to search
MyraMidnight (talk | contribs) |
MyraMidnight (talk | contribs) m |
||
Line 1: | Line 1: | ||
{{WikiHelp}} | {{WikiHelp}} | ||
− | + | :'''Note:''' Most templates should only be edited by the [[User:MyraMidnight|WikiWriter]] because of formatting, ''except for correcting spelling or links.'' | |
+ | |||
==What are Templates?== | ==What are Templates?== | ||
*Templates are used on wikis to add content and codes to pages, by simpling adding a '''<code>{{[[:Category:Templates|Template]]}}</code>''', which will display the template's content as part of the wiki-page when viewed, while only actually being a short template-tag when you are editing the page. | *Templates are used on wikis to add content and codes to pages, by simpling adding a '''<code>{{[[:Category:Templates|Template]]}}</code>''', which will display the template's content as part of the wiki-page when viewed, while only actually being a short template-tag when you are editing the page. | ||
Line 6: | Line 7: | ||
*This also makes it easier to update information that is repeated on multiple pages, by simply updating the template containing the information. | *This also makes it easier to update information that is repeated on multiple pages, by simply updating the template containing the information. | ||
− | ==How do I edit the | + | ==How do I edit the Templates?== |
To easily find and edit the active templates within a page: | To easily find and edit the active templates within a page: | ||
#Press the "''edit''" button at the top of the page | #Press the "''edit''" button at the top of the page | ||
Line 16: | Line 17: | ||
*They prevent the content which is placed between them from being included on wiki-pages. The content of those tags will only be visible on the template page itself. | *They prevent the content which is placed between them from being included on wiki-pages. The content of those tags will only be visible on the template page itself. | ||
*What those tags contain is usually little information about what this template is ment for, or adding said templates to categories without effecting pages that use that template. | *What those tags contain is usually little information about what this template is ment for, or adding said templates to categories without effecting pages that use that template. | ||
+ | |||
+ | ==Using Templates== | ||
+ | :On each template's page are explanations for how to use that specific template. | ||
+ | :*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 template's 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}} |
Revision as of 01:38, 16 August 2014
Our Wiki Help Pages | ||||
---|---|---|---|---|
General Mediawiki Helpguides |
- Note: Most templates should only be edited by the WikiWriter because of formatting, except for correcting spelling or links.
What are Templates?
- Templates are used on wikis to add content and codes to pages, by simpling adding a
{{Template}}
, which will display the template's content as part of the wiki-page when viewed, while only actually being a short template-tag when you are editing the page. - This frees the page of repetitive information or complex codes cluttering when you are editing a page.
- This also makes it easier to update information that is repeated on multiple pages, by simply updating the template containing the information.
How do I edit the Templates?
To easily find and edit the active templates within a page:
- Press the "edit" button at the top of the page
- Scroll down to the bottom, below the text-editing area, there you will see a list of templates currently in use on the page, and a easy "edit" button next to each link.
- When you press the "edit" link next to the template name, you will be taken to the content of that template.
- You will often see <noinclude> </noinclude> tags at the top of those template pages, DO NOT REMOVE THOSE TAGS
What are those "noinclude" tags anyway?
- They prevent the content which is placed between them from being included on wiki-pages. The content of those tags will only be visible on the template page itself.
- What those tags contain is usually little information about what this template is ment for, or adding said templates to categories without effecting pages that use that template.
Using Templates
- On each template's page are explanations for how to use that specific template.
- Many templates let you add content to it by filling it in the right order within the tag:
- example: the
{{yes}}
is specifically made to be used within table cells (else it looks like plain code).
Using templates (with {{yes}} template as example)
| ||
---|---|---|
Description | Code | Results |
Plain use of template, fills the cell with color and "yes" | {{yes}} |
Yes |
Adding text to template, in this template's case it will replace the default text. | {{yes|usually}} |
usually |
- If you would use this template outside of its designated usage (which is within table cells), it turns out looking like this:
- style="background:#9F9;vertical-align:middle;text-align:center;" class="table-yes"|Yes