Wikia

LyricWiki

Help:Templates

Talk14
2,410,346pages on
this wiki

Contents


General Information

Templates are provided to reduce the amount of repetitive wikitext in pages. Templates are a sort of shorthand, to make creating and editing wiki pages easier. Templates also help to make LyricWiki visually more uniform. Templates are placed within two sets of curly brackets, or braces, {{}} and contain one or more divisions of information.

If the template has more than one division, each division is separated by a vertical line, or pipe |. The first division contains the name of the template, followed by any number of divisions containing information that are used to complete the template. More often, the template uses named parameters to make the order irrelevant and the parameters optional.

This page contains a listing of all frequently used and useful templates available on LyricWiki. If you find a template to be missing, please insert it at the appropriate location in the list. For documentation and use of the template, please refer to the template page.

Templates without much information are usually formatted as:

{{Name|Division Two|Division Three}}

Templates containing more information are usually formatted as:

{{Name
|Division Two 
|Division Three 
|Division Four 
|Named Parameter One = value 
|Named Parameter Two = value 
}}

NOTE: Like all pages on LyricWiki, templates are case-sensitive, except the first letter of the template name. Therefore, {{Wikipedia}} and {{wikipedia}} will produce the same result, but {{WikiPedia}} won't.


Wikipedia

All LyricWiki articles for which a Wikipedia page exists should include a link to that page. The {{ArtistHeader}}, {{Album}} and {{SongFooter}} templates have parameters for producing such a link. Here are some additional options:

Floating Box

A floating box containing the article link and the Wikipedia graphic.

For example, the Wikipedia template:

{{Wikipedia|Country (film)|Country}}

produces:

Wikipedia
Wikipedia has an article on

In this example, the first division holds the template's name (in this case, Wikipedia), followed by two divisions that specify information for completing the template. The second division specifies the name of the Wikipedia article being linked to. In this case, "Country" wouldn't be specific enough to link to the film's article, so "Country (film)" must be used. The final division specifies the title that LyricWiki users will see, i.e. "Country".

See the template documentation for more information.

NOTE:

Simple Text

A simple text link to a Wikipedia page can be created using the {{wp}} template:

{{wp|Article name|display text}}

All parameters of the {{wp}} are the same as for the {{Wikipedia}} template. For example, this text...

Read about {{wp|Country (film)|Country}} on Wikipedia.

...produces the following result:

Read about Country on Wikipedia.

Simple Text with Icon

The template {{wpi}} is similar to the simple text link above but is preceded by a Wikipedia icon:

Read about {{wpi|Country (film)|Country}} on Wikipedia.

...produces the following result:

Read about Wikipedia16 Country on Wikipedia.

Song Flagging

Multiple Languages

In the case that a song is released in more than one language, it is recommended that links to the other versions of the lyrics be added. The {{MultipleLanguages}} template makes this task easier.

{{MultipleLanguages
|English Song Title/en
|Spanish Song Title/es
|...
}}

See David Bowie:"Heroes" for a working example.

Common language codes are:

  • de (German)
  • en (English)
  • es (Spanish)
  • fr (French)
  • ja (Japanese)
  • ko (Korean)
  • pl (Polish)
  • ru (Russian)
  • zh (Chinese)

A complete Wikipedia list of ISO 639-1 language codes can be found here.

Instrumental Tracks

Tracks that are instrumentals should be marked with the {{Instrumental}} template inside the lyric tags:

<lyrics>{{Instrumental}}</lyrics>

This template only has one division, its name. It produces the following:

Informational templates

  • Information about the song: {{SInfo}}
  • General information box: {{Info}}
  • Instrumental song: {{Instrumental}}
  • Cover version of a song:
    • {{Cover}} for a link to the original song
    • {{Cover2}} for a link to the cover version
    • {{Covered}} for a collapsible list of artists who have covered the song
  • Additional albums song released on: {{AddAlb}}
  • Parody of another song: {{Parody}}
  • Unplugged (Acoustic) album: {{Unplugged}}
  • Remix of original song: {{Remix}}
  • {{GameFeature}}
  • {{Live Lyrics}}
  • {{No.1}}

Awards

  • (Grammy) award: {{Award}} (or specifically: {{Grammy}}).
  • Album Of The Week: {{AOTW}}
  • Song Of The Day: {{SOTD}}

Flagging for Edits

  • General request for editing: {{Edit}}
  • When possible, please use one of the following instead:

Artist Pages

See Help:Contents/Editing/Formatting/Artists for more information.

  • To display an album picture next to a track listing insert the {{Album Art}} template directly under the album's title:
{{Album Art|IMAGE|ALBUM NAME}}

IMAGE is generally in the form ARTIST - ALBUM NAME.jpg

  • When {{Album Art}} invades into an album listing below it, use {{Clear}} after that album listing to prevent the invasion. {{Clear}} inserts a division break.
  • {{ft}} for listing featured artists
  • {{H4}} for formatting headers for individual discs
  • {{Labels}}
  • {{tl|Genres))

Multiple languages

User (talk) pages

  • Welcome to LyricWiki message: {{Welcome}}
  • Welcome to LyricWiki and invitation to register for unregistered users: {{WelcomeIP}}
  • Reverted edit: {{Reverted}} (for inappropriate but good-faith edits)
  • Vandalism warning: {{WarnUser}} or {{WarnUser/Editing}} (for users who are clearly committing vandalism)
  • {{ArchNav}}: for archive talk pages

User pages

Wiki restrictions

External linking

Administration

A template is a special type of page that has been designed so its content can be included in other pages. Since a given template can be included in many pages, it can help reduce duplication and promote a uniform style between pages.

Templates are usually located in the Template namespace. This includes any page with a name beginning with Template:, such as Template:Name.

Video overview

If you're new to templates, this video will help you get started.


Why use templates?

Templates can be useful for...

  • Creating content that should appear on many pages.
  • Formatting content (such as infoboxes) in a way that should be consistent across many pages.
  • Creating a shortcut for writing things that you repeat often when communicating with others.
  • Replacing long, complicated code so that a page is easier for other users to edit.
  • Protecting parts of a page from editing while leaving other sections open for edits.

How to create a basic template

Templates can be very powerful, but also sometimes very complicated. It often helps to start by creating the simplest possible kind of template, and then experimenting from there.

  • Type "Hello, World" in the editor.
  • Click "Publish." You have just created a template with some sample content.
  • On your wiki, create a new article called "Testing templates".
  • In the editor, go to Source mode and enter the following code:
{{Example}}
  • Click Publish. Your "Testing Templates" page should display the text you added to your template.

You've successfully created and used a template! Now you can change the content of your template and add it to more pages to make it more useful for your wiki.

Adding and editing pre-existing templates

Templates-rightrail

Wikis come with pre-loaded default templates. You can view a complete list of templates available on your wiki by going to Special:AllPages and selecting "Template" from the namespace dropdown menu. Click "Go" and all available templates will appear in a list.

  • In the Visual editing mode, you can select from the list of all templates available on your wiki by clicking "Add other templates".
  • In source mode, you can use the code {{Template name}} to add any template to your wiki.
  • Advanced users can edit the page MediaWiki:Editor-template-list to change the list of templates available by default in the "Templates" section of the editor. Up to 4 templates can be in this list.

Substituting templates

A different way to use a template is to substitute its content into a page. This is done by inserting subst: immediately after the opening braces: {{subst:templatename}}. Once the page is saved, the link to the template is removed and the template output is substituted in its place and can be further edited. Any updates to the template will not affect the content that was substituted into the page.

To learn how to change the output of the template based on what the user inputs, see Help:Template parameters and Help:Parser functions.

Updating and adding standard templates

Wikia's official Starter Pages and semi-official Templates wikis occasionally improve some of their documentation as well as adding new templates specifically designed for Wikia sites, and are therefore worth checking from time to time.
For sites created before about December 2008, the Starter Pages wiki should be compared and ideally used for upgrading to its standard documentation system similar to that introduced in Wikipedia.

Template Webinar

Looking for further video instruction? This webinar recording overviews the basics of adding and customizing templates for your wiki.


See also

Further help and feedback

Photos

Add a Photo
108,583photos on this wiki
See all photos >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki