FANDOM


There are many templates in use in Hyouka Wiki.

  • Category:Templates should cover all templates in the wiki, categorized into the various subcategories.
  • The Template namespace (found from Special:Allpages) always has all templates in the wiki, sorted alphanumerically.

What are templates? Edit

Main article: Help:Templates

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.

Guidelines Edit

  • Templates should not normally be used to store article text, as this makes it more difficult to edit the content. They should also not be used to "collapse" or "hide" content from the reader.
  • Templates used in articles are designed to provide information to assist readers, such as navigation aids, formatting, or warnings that content is sub-standard. Templates that provide information only of service to editors should not appear on article pages.
  • Template function should be clear from the template name, but redirects can be created to assist everyday use of very popular templates.
  • Templates should be clearly documented as to their usage and scope.

Suggested practices Edit

Referencing templates Edit

Use Template:T template to show example template code (with a link to the template) without using the template itself. For example, to reference the Stub template, you can type {{t|Stub}}, which will result in {{Stub}}.

Template names Edit

Template names can be made of one or more words. The first character (only) is not case-sensitive, so {{stub}} and {{Stub}} are the same template, but {{cfd}} and {{cfD}} are not. Template names are easiest to remember if they follow standard English spelling, spacing, and capitalization. Avoid having templates whose names differ only in case, spacing, or punctuation.

Sandbox for experiments Edit

If you wish to experiment with templates (and not have your experiments deleted before you are done with them), you may do so in the Template sandbox.

Existing templates often each have their own sandbox and test case pages (especially those that use {{Documentation}}). Changes should be thoroughly tested there before being applied to the main template, in order to prevent unintentional damage to many pages.

Readability Edit

For templates that use a large number of parameters, it can be helpful to place each parameter on a separate line and align the equals signs. This help future editors to more easily read the wikicode.

{{Example template name
| first_parameter  = Text of first_value
| second_parameter = Text of second_value
| third_parameter  = Text of third_parameter
| etc              = etc
}}

Line breaks Edit

Some templates may accidentally cause extra line breaks in the rendered articles. This is especially true of infobox templates and other template boxes that usually float on the right side of an article, since the additional lines will not be seen on the template page.

As a general guideline, avoid two line breaks together in your template. These may "add up" with other line breaks in the article and be displayed as unwanted white space.

Substitution Edit

Main article: Help:Substitution

Invoking a template using the form

{{subst:name of template (|parameters |...)}}

(that is, inserting subst: immediately after the opening pair of curly brackets) will make a copy of the template text and place it on the page, where it will be viewable in the source. The template is no longer transcluded and future changes to the template will not change the text. As a guideline, this method should be used for any short, temporary messages which are removed quickly.

Use subst: also if you need to edit the message after including it on the page. If you don't need to edit it, and would rather the message is automatically updated along with changes made to the template, don't use subst:.

Documentation Edit

Because templates represent a step up in difficulty for the novice editor, documentation should be provided which describes its usage (optional parameters) and scope (where it should be used). There are two different ways to do this:

One alternative is to use <noinclude> to add a minor description direct into the template, for example:

'''This is a {{{1}}} article.'''<noinclude>
Place this template on any article that requires description. It 
takes one parameter, an adjective used to describe the article. 
For example, {{article-describe|bad}} produces the text, 
'''This is a bad article.'''
</noinclude>

Another alternative is to create a formal /doc subpage for the documentation (preferred for templates with multiple parameters, etc.) and add <noinclude>{{Documentation}}</noinclude> after the actual template. The first "noinclude" tag should be placed on the same line as the end braces of the actual template in the following manner:

{{(template name)
(piped parameters)
}}<noinclude>...

If the "noinclude" tag starts on the line below the template's closing braces, then unwanted whitespace is introduced at the bottom of the template when it is used in articles and on other pages.

Searching for templates Edit

Use this form to search in the Template: or Template_talk: namespaces.

Pages which contain information on commonly used templates:

Where you may find more templates Edit

  • Templates Wiki
  • Wikipedia; may be copied with the proper acknowledgment, but some need tweaking to work properly on Fandom wiki, so use a Templates Wiki one if possible.
This page uses Creative Commons Attribution-ShareAlike licensed content from Wikipedia (view authors).
Community content is available under CC-BY-SA unless otherwise noted.