Difference between revisions of "Template:TrackListEntry"
From Video Game Music Preservation Foundation Wiki
Malvineous (talk | contribs) m (Fix examples) |
Malvineous (talk | contribs) (microdata: Expand inAlbum to include URL as well as name) |
||
Line 130: | Line 130: | ||
--><meta itemprop="url" content="{{fullurl:{{{TitleLink|{{#ifexist:{{{Title}}} - {{{Game}}} ({{{Platform}}})|{{{Title}}} - {{{Game}}} ({{{Platform}}})|{{{Title|{{FULLPAGENAME}}}}}}} }}} }}" /><!-- | --><meta itemprop="url" content="{{fullurl:{{{TitleLink|{{#ifexist:{{{Title}}} - {{{Game}}} ({{{Platform}}})|{{{Title}}} - {{{Game}}} ({{{Platform}}})|{{{Title|{{FULLPAGENAME}}}}}}} }}} }}" /><!-- | ||
− | Hidden element with the album name for microdata. This is just "Game (Platform)" (or just "Game" if there's no platform specified). | + | Hidden element with the album name for microdata. This is just "Game (Platform)" (or just "Game" if there's no platform specified). Also includes a URL for the album which is the wiki page displaying the track list. |
− | --><meta itemprop=" | + | --><span otemprop="inAlbum" itemscope itemtype="http://schema.org/MusicAlbum"><meta itemprop="name" content="{{{Game}}} {{#if:{{{Platform|}}}|({{{Platform}}})}}" /><meta itemprop="url" content="{{canonicalurl:{{FULLPAGENAME}}}}" /></span><!-- |
--></td>{{#if:{{{Extra8|}}}| | --></td>{{#if:{{{Extra8|}}}| |
Revision as of 02:22, 16 May 2015
This template is used to start a table of song recordings. It is combined with Template:TrackListBegin and Template:TrackListEnd to produce the full table of recordings.
Tables produced with this template contain structured data allowing search engines to list the recordings directly in the search results.
The following parameters are valid:
Parameter | Example | Purpose |
---|---|---|
Track | Track = 1 | Track number (do not use leading zeroes). |
Title | Title = A Song | Song title. |
TitleLink (optional) | TitleLink = A Song (Example Game) | Link to the song's page, if it is different to the song title. Only use this if the page for the song is actually named differently to the song title, and the page cannot be renamed. The default link is:
Only use this parameter where it is not possible to rename the song page so that it fits the standard wiki naming scheme. |
Composer | Composer = {{TrackListComposer|John Doe}} Composer = {{TrackListComposer|Johnny Doe|John Doe}}, {{TrackListComposer|Bob Smith|Robert Smith}} |
Name of the composer(s). Only one Composer option can be specified, so multiple composers should be comma separated. Remember to surround composer names with the Template:TrackListComposer template. Template use is {{TrackListComposer|Credited name|Article name}} where the credited name is as per the game credits, and the article name is the destination wiki page to link to. The article name parameter can be omitted when it is the same as the credited name. |
DurationMin DurationSec |
DurationMin = 1 DurationSec = 23 |
Length of the song, split into minutes and seconds as separate parameters. The example produces a song length of 1:23. |
Game | Game = Example Game | Name of the game this song is from. This is used to populate the 'album' fields. |
Platform | Platform = DOS | Game platform. This is used to populate the 'album' fields. |
Recording (optional) | Recording = Filename.ogg | Filename of the recording. Avoid using this parameter if possible. The default filename is "Track - Game - Platform - Title.ogg" with Track padded with a leading zero if needed, so it is always two digits long. |
Example
This code:
{{TrackListBegin}} {{TrackListEntry | Track = 1 | Title = Example | Composer = {{TrackListComposer|John Doe}} | DurationMin = 1 | DurationSec = 23 | Game = Example | Platform = DOS }} {{TrackListEnd}}
Will appear as:
# | Title | Composer | Length | Listen | Download |
---|---|---|---|---|---|
01 | Example | John Doe | 1:23 | Download |
Development
This section is used to preview changes to the template code during development.
# | Title | Composer | Length | Listen | Download |
---|---|---|---|---|---|
? | [[{{{Title}}}]] | Unknown | 0:00 | [[Media:00_-_{{{Game}}}_-_{{{Title}}}.ogg|Download]] |