Help:Template: Difference between revisions

From the Nintendo Wiki, a wiki covering all things Nintendo
Jump to navigationJump to search
Content deleted Content added
fix
overhaul; now using content from https://www.mariowiki.com/Help:Template
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
As with other wikis, the Nintendo Wiki provides templates that help the user to browse any information quickly and efficiently. See also [[Nintendo Wiki:Navigation templates]] and [[Nintendo Wiki:Notice templates]] for more in-depth information about these two major groups of templates.
There are many '''templates''' in use in the {{SITENAME}} and these are only subset, representing some of the most important and commonly used ones. If you feel that a template belongs on this page, do not hesitate to add it.


==Usage==
* [[:Category:Templates]] should list all templates in the wiki, categorized into the various subcategories.
* The Template namespace always has all templates in the wiki, unsorted.
To understand their usage, the templates existing in this wiki are classified in this way:


*[[:Category:Content templates|Content templates]] – These templates are used in articles and have a specific use based around a given series, game, console, etc.
== What are templates? ==
*[[:Category:Formatting templates|Formatting templates]] – These templates allow users to change elements of a page quickly by just adding them. Examples are the {{tem|color}} template to change the color of the text and {{tem|ref needed}} the add over a text that lacks a citation to make it valid.
Wiki templates provide a means to insert the same content over and over in different (or the same) pages. This saves editors the hassle of duplicating the same text again and again, and also helps ensure consistency.
*[[:Category:Image map templates|Image map templates]] – These templates contain an image with links. By clicking on an linked area of the image, the user will be sent to the article in question.
*[[:Category:Infobox templates|Infobox templates]] – These templates contain the essential information about the topic of an article. Examples are {{tem|character infobox}} and {{tem|game infobox}}.
*[[:Category:Media templates|Media templates]] – These templates serve to contain media such as images, videos and audio files.
*[[:Category:Navigation templates|Navigation templates]] – These templates has links that are directly or indirectly related to a topic. A good example can be the {{tem|SMG}} template that shows all the elements related to the game ''[[Super Mario Galaxy]]''.
*[[:Category:Notice templates|Notice templates]] – These templates serve to notice readers the current state of a page. Arguably the most used templates found in this category are the {{tem|stub}} and {{tem|upcoming}} templates. The first describes a page or article needs to be deeply developed and the latter talks about a future project, like a new game.
*[[:Category:Project templates|Project templates]] – These templates are made for the internal projects of the wiki.
*[[:Category:Userbox templates|Userbox templates]] – These templates are decorative tables to describe our users in the Nintendo Wiki. Used ''only'' for your user pages.


==Code==
Templates are generally shown with the format required to use the template (e.g. {{t|stub}}). Clicking the template name takes you to the template's page, where you can see what it looks like and how it is used.
Make sure you know the MediaWiki syntax for a template:


To create a template, it's needed to put the title starting '''Template''' and then the name of the template. Example: '''Template:Name of template'''
'''Detailed instructions on the usage of each template should exist on their respective pages.'''


Add the content you want to show for the template in the edit area. To insert an input, type <tt><nowiki>{{{1}}}</nowiki></tt> for the first input, <tt><nowiki>{{{2}}}</nowiki></tt> for the second, and so on. You can also specify the input by inserting a name like this <tt><nowiki>{{{name}}}</nowiki></tt>.
== [[:Category:Notice templates|Notice templates]] ==
=== About ===
{{t|about}}


Once you've finished, it's possible that you have to use the coding <tt><nowiki><includeonly> </includeonly></nowiki></tt> to tag the content of the template that will be shown and <tt><nowiki><noinclude> </noinclude></nowiki></tt> to tag the rest that shouldn't. The Noinclude tag usually covers the usage instructions of the template and the template's category.
* Add this to the top of an article to refer to any identically named article(s). It is a "for x see y" template.


To embed a template, simply type <tt><nowiki>{{Name of template}}</nowiki></tt> in a page.
=== Nominate an article for deletion ===
{{t|delete}}


If the template is in any other namespace, simply type <tt><nowiki>{{namespace:Name of template}}</nowiki></tt> to use it.
* Add this to an article to nominate it for deletion. It will add the article to [[:Category:Candidates for deletion]].


If the template has inputs, type <tt><nowiki>{{Name of template|write here to change the first parameter of a template|write here to change the second one}}</nowiki></tt>
=== Disambiguation articles ===
{{t|disambig}}


If the template has specified inputs, type <tt><nowiki>{{Name of template|name=The name of something}}</nowiki></tt>
* If you have several articles that have similar or identical names, you may wish to create a "disambiguation" page at the main article name, with the articles taking an extra phrase in brackets afterwards. For example:
: '''<nowiki>[[Giga Bowser]]</nowiki>''' <-- disambiguation page, with links to:
:: <nowiki>[[Giga Bowser (character)]]</nowiki>
:: <nowiki>[[Giga Bowser (Final Smash)]]</nowiki>
* For more information, see [[Wikipedia:Wikipedia:disambiguation|disambiguation on Wikipedia]].
* Using {{t|disambig}} marks an article as a disambiguation page by adding a banner to the article and categorizing it under [[:Category:Disambiguation]]. Add links to the various articles under the banner.


=== Main article ===
===Substituting===
In some cases involving more complex coding and template functions, '''subst:''' must be placed before the template name. This substitutes the dynamic code on the page with static text (i.e. the content within the template is pasted on the other page, rather than the template itself). For example, <tt><nowiki>{{tick}}</nowiki></tt> will display as <tt><nowiki>{{tick}}</nowiki></tt> in the code, while <tt><nowiki>{{subst:tick}}</nowiki></tt> will display as <tt><nowiki>[[File:wiki tick.GIF]]</nowiki></tt> in the code, which is what is contained in the <nowiki>{{tick}}</nowiki> template.
{{t|main}}


==Example==
* Use at the start of a section to link to the main article on it.
Here is a simple example, creating a signature for any user typing '''<nowiki>{{Sig|User}}</nowiki>''':


:If the template contains the code:
=== Sandbox ===
:<pre>[[User:{{{1}}}|{{{1}}}]] ([[User talk:{{{1}}}|talk]] &middot; [[Special:Contributions/{{{1}}}|edits]])</pre>
{{t|sandbox}}
:Typing <nowiki>{{Sig|user}}</nowiki> inserts this code:
:<pre>[[User:User|User]] ([[User talk:User|talk]] &middot; [[Special:Contributions/User|edits]])</pre>
:Which shows on the page as:


:[[User:User|User]] ([[User talk:User|talk]] &middot; [[Special:Contributions/User|edits]])
* A template that should be used to head up the [[Project:Sandbox]] page.


=== Stub ===
==See also==
*[[Nintendo Wiki:Navigation templates]]
{{t|stub}}
*[[Nintendo Wiki:Notice templates]]

*[[wikipedia:Help:Template]]
* When a page has little or no useful information, then it is likely a stub. This template will include them in [[:Category:Stubs]], and is used to list which articles need expanding.

== [[:Category:Formatting templates|Formatting templates]] ==

=== Br ===
{{t|br}}

* This template is used to reduce the amount of non-wikicode used on pages, replacing the code <code>&lt;br style="clear:both;" /&gt;</code>. Its use should generally be avoided.
* You can use {{t|br}} instead of the HTML tag that clears space below things like images, pictures and tables, so the following stuff doesn't begin until the bottom of the image, picture or table box. Additionally, you can add <code>|left</code> or <code>|right</code> to clear only left or right floats respectively.

=== Color ===
{{t|color}}, {{t|color-link}}, {{t|color-link-external}}

*Changes the color of a text, a wiki link (including piped), and external links, respectively.

=== T ===
{{T|t}}

* This template allows you to show example template code (with a link to the templates) without using the template itself. It is used extensively on this page.

=== Welcome ===
{{t|welcome}}

* A template to welcome new users with. Should be customized for the wiki.

=== Wikipedia ===
{{t|wikipedia}}, {{t|wikipedia-deleted}}

* Wikipedia-related templates. Use {{t|wikipedia}} for articles taken directly from Wikipedia, and {{t|wikipedia-deleted}} for Wikipedia articles that were deleted or redirected.


{{Nintendo Wiki}}
{{Shortcut|NW:TEMPLATE}}
[[Category:Help]]
[[Category:Help]]
[[Category:Templates| ]]

Latest revision as of 22:02, February 16, 2024

As with other wikis, the Nintendo Wiki provides templates that help the user to browse any information quickly and efficiently. See also Nintendo Wiki:Navigation templates and Nintendo Wiki:Notice templates for more in-depth information about these two major groups of templates.

Usage[edit]

To understand their usage, the templates existing in this wiki are classified in this way:

  • Content templates – These templates are used in articles and have a specific use based around a given series, game, console, etc.
  • Formatting templates – These templates allow users to change elements of a page quickly by just adding them. Examples are the {{color}} template to change the color of the text and {{ref needed}} the add over a text that lacks a citation to make it valid.
  • Image map templates – These templates contain an image with links. By clicking on an linked area of the image, the user will be sent to the article in question.
  • Infobox templates – These templates contain the essential information about the topic of an article. Examples are {{character infobox}} and {{game infobox}}.
  • Media templates – These templates serve to contain media such as images, videos and audio files.
  • Navigation templates – These templates has links that are directly or indirectly related to a topic. A good example can be the {{SMG}} template that shows all the elements related to the game Super Mario Galaxy.
  • Notice templates – These templates serve to notice readers the current state of a page. Arguably the most used templates found in this category are the {{stub}} and {{upcoming}} templates. The first describes a page or article needs to be deeply developed and the latter talks about a future project, like a new game.
  • Project templates – These templates are made for the internal projects of the wiki.
  • Userbox templates – These templates are decorative tables to describe our users in the Nintendo Wiki. Used only for your user pages.

Code[edit]

Make sure you know the MediaWiki syntax for a template:

To create a template, it's needed to put the title starting Template and then the name of the template. Example: Template:Name of template

Add the content you want to show for the template in the edit area. To insert an input, type {{{1}}} for the first input, {{{2}}} for the second, and so on. You can also specify the input by inserting a name like this {{{name}}}.

Once you've finished, it's possible that you have to use the coding <includeonly> </includeonly> to tag the content of the template that will be shown and <noinclude> </noinclude> to tag the rest that shouldn't. The Noinclude tag usually covers the usage instructions of the template and the template's category.

To embed a template, simply type {{Name of template}} in a page.

If the template is in any other namespace, simply type {{namespace:Name of template}} to use it.

If the template has inputs, type {{Name of template|write here to change the first parameter of a template|write here to change the second one}}

If the template has specified inputs, type {{Name of template|name=The name of something}}

Substituting[edit]

In some cases involving more complex coding and template functions, subst: must be placed before the template name. This substitutes the dynamic code on the page with static text (i.e. the content within the template is pasted on the other page, rather than the template itself). For example, {{tick}} will display as {{tick}} in the code, while {{subst:tick}} will display as [[File:wiki tick.GIF]] in the code, which is what is contained in the {{tick}} template.

Example[edit]

Here is a simple example, creating a signature for any user typing {{Sig|User}}:

If the template contains the code:
[[User:{{{1}}}|{{{1}}}]] ([[User talk:{{{1}}}|talk]] · [[Special:Contributions/{{{1}}}|edits]])
Typing {{Sig|user}} inserts this code:
[[User:User|User]] ([[User talk:User|talk]] · [[Special:Contributions/User|edits]])
Which shows on the page as:
User (talk · edits)

See also[edit]