Difference between revisions of "Template:TrackListEntry"
Line 118: | Line 118: | ||
<td>{{{Extra4}}}</td>}}{{#if:{{{Extra5|}}}| | <td>{{{Extra4}}}</td>}}{{#if:{{{Extra5|}}}| | ||
<td>{{{Extra5}}}</td>}} | <td>{{{Extra5}}}</td>}} | ||
− | <td style="text-align:right;">{{{DurationMin|0}}}:{{#ifexpr:{{{DurationSec|0}}} < 10|0}}{{{DurationSec|0}}}</td> | + | <td style="text-align:right;">{{{DurationMin|0}}}:{{#ifexpr:{{{DurationSec|0}}} < 10|0}}{{{DurationSec|0}}}</td> |
− | |||
− | |||
<td>{{Song-Box|{{#if:{{{Recording|}}} | {{{Recording|}}} | {{ZeroPad|{{{Track|0}}}}}_-_{{{Game}}}_-_{{#if:{{{Platform|}}}|{{{Platform}}}_-_}}{{{TitleLink|{{{Title}}}}}}.ogg}} }}</td> | <td>{{Song-Box|{{#if:{{{Recording|}}} | {{{Recording|}}} | {{ZeroPad|{{{Track|0}}}}}_-_{{{Game}}}_-_{{#if:{{{Platform|}}}|{{{Platform}}}_-_}}{{{TitleLink|{{{Title}}}}}}.ogg}} }}</td> | ||
<td itemprop="recordedAs" itemscope itemtype="http://schema.org/MusicRecording"><meta itemprop="duration" content="PT{{{DurationMin|0}}}M{{{DurationSec|0}}}S" /><!-- | <td itemprop="recordedAs" itemscope itemtype="http://schema.org/MusicRecording"><meta itemprop="duration" content="PT{{{DurationMin|0}}}M{{{DurationSec|0}}}S" /><!-- | ||
Line 149: | Line 147: | ||
--><span itemprop="inAlbum" itemscope itemtype="http://schema.org/MusicAlbum"><meta itemprop="name" content="{{{Game}}} {{#if:{{{Platform|}}}|({{{Platform}}})}}" /><meta itemprop="url" content="{{canonicalurl:{{FULLPAGENAME}}}}" /><meta itemprop="sameAs" content="{{canonicalurl:{{FULLPAGENAME}}}}" /></span><!-- | --><span itemprop="inAlbum" itemscope itemtype="http://schema.org/MusicAlbum"><meta itemprop="name" content="{{{Game}}} {{#if:{{{Platform|}}}|({{{Platform}}})}}" /><meta itemprop="url" content="{{canonicalurl:{{FULLPAGENAME}}}}" /><meta itemprop="sameAs" content="{{canonicalurl:{{FULLPAGENAME}}}}" /></span><!-- | ||
− | --></td> | + | --></td> |
− | |||
− | |||
</tr> | </tr> | ||
<noinclude> | <noinclude> |
Revision as of 13:59, 21 September 2020
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. You don't need to use this if the title follows the standard Wiki scheme. The title link will automatically redirect to song pages as they become available. It will first check for a specific platform, then a specific game, and finally, the generic song title. For example:
This parameter should only be used when the song page doesn't follow the Wiki scheme. For example the Boppin' (DOS) song "Boppin Opus #43" cannot have the "#" symbol in an article name, so it needs a TitleLink of "Boppin Opus 43" without the hash symbol. Note that if you supply this parameter, it is used in place of the song title for all wiki links, such as the auto-generated song recording file name. (You can still override that with the Recording parameter of course.) |
Composer | Composer = {{TrackListComposer|John Doe}} | Name of the composer(s). Each composer should use the Template:TrackListComposer template. If multiple composers collaborated on a song, separate each template with a comma. Example: {{TrackListComposer|John Doe}}, {{TrackListComposer|Steve Smith}}. The name in the template must be the composer's page name. If the composer is credited with an alias or a name variation, document the alias in the Credits section only. |
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 code. This is used to populate the 'album' fields. |
Recording (optional) | Recording = Filename.ogg | File name of the recording. Avoid using this parameter if possible. The default file name 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]] |