Difference between revisions of "Template:TrackListEntry"

From Video Game Music Preservation Foundation Wiki
Jump to: navigation, search
(Add Game - Platform")
(6 intermediate revisions by 2 users not shown)
Line 19: Line 19:
 
| '''TitleLink''' (optional)
 
| '''TitleLink''' (optional)
 
| <tt>TitleLink&nbsp;=&nbsp;A&nbsp;Song&nbsp;(Example&nbsp;Game)</tt>
 
| <tt>TitleLink&nbsp;=&nbsp;A&nbsp;Song&nbsp;(Example&nbsp;Game)</tt>
| 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:
+
| 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:
* "''Title'' - ''Game'' (''Platform'')", if that page exists (e.g. [[Map - Rampage (NES)]]).
+
# "''Title'' - ''Game'' (''Platform'')", if that page exists (e.g. [[Map - Rampage (NES)]]).
* "''Title'' - ''Game''", if that page exists (e.g. [[Main Theme - Ski or Die]]).
+
# "''Title'' - ''Game''", if that page exists (e.g. [[Main Theme - Ski or Die]]).
* Otherwise the link is just ''Title'' (e.g. [[Map]]).
+
# Otherwise the link is just ''Title'' (e.g. [[Map]]).
Only use this parameter where it is not possible to rename the song page so that it fits the standard wiki naming scheme.
+
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'''
| <tt><nowiki>Composer = {{TrackListComposer|John Doe}}</nowiki></tt><br/><tt><nowiki>Composer = {{TrackListComposer|John Doe|Johnny Doe}}, {{TrackListComposer|Robert Smith|Bob Smith}}</nowiki></tt>
+
| <tt><nowiki>Composer = {{TrackListComposer|John Doe}}</nowiki></tt>
| 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 <nowiki>{{TrackListComposer|Article name|Credited name}}</nowiki> where the ''credited name'' is as per the game credits, and the ''article name'' is the destination wiki page to link to.  The ''credited name'' parameter can be omitted when it is the same as the ''article name''.
+
| 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: <nowiki>{{TrackListComposer|John Doe}}, {{TrackListComposer|Steve Smith}}</nowiki>. 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'''<br/>'''DurationSec'''
 
| '''DurationMin'''<br/>'''DurationSec'''
 
| <tt>DurationMin = 1<br/>DurationSec = 23</tt>
 
| <tt>DurationMin = 1<br/>DurationSec = 23</tt>
| Length of the song, split into minutes and seconds as separate parameters. The example produces a song length of 1:23.
+
| Length of the song, split into minutes and seconds as separate parameters. The example produces a song length of 1:23.
 
|-
 
|-
 
| '''Game'''
 
| '''Game'''
 
| <tt>Game = Example Game</tt>
 
| <tt>Game = Example Game</tt>
| Name of the game this song is from. This is used to populate the 'album' fields.
+
| Name of the game this song is from. This is used to populate the 'album' fields.
 
|-
 
|-
 
| '''Platform'''
 
| '''Platform'''
 
| <tt>Platform = DOS</tt>
 
| <tt>Platform = DOS</tt>
| Game platform. This is used to populate the 'album' fields.
+
| Game platform code. This is used to populate the 'album' fields.
 
|-
 
|-
 
| '''Recording'''&nbsp;(optional)
 
| '''Recording'''&nbsp;(optional)
 
| <tt>Recording = Filename.ogg</tt>
 
| <tt>Recording = Filename.ogg</tt>
| 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.
+
| 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.
 
|}
 
|}
  
Line 88: Line 90:
 
     <td itemprop="name"><!--
 
     <td itemprop="name"><!--
  
Link with song title as "name" microdata attribute. The link target is the first valid page, in this order:
+
Link with song title as "name" microdata attribute. The link target is the first valid page, in this order:
  
 
  * TitleLink parameter
 
  * TitleLink parameter
Line 111: Line 113:
 
--></td>{{#if:{{{Extra1|}}}|
 
--></td>{{#if:{{{Extra1|}}}|
 
     <td>{{{Extra1}}}</td>}}{{#if:{{{Extra2|}}}|
 
     <td>{{{Extra1}}}</td>}}{{#if:{{{Extra2|}}}|
     <td>{{{Extra2}}}</td>}}{{#if:{{{Extra3|}}}|
+
     <td>{{{Extra2}}}</td>}}
    <td>{{{Extra3}}}</td>}}
 
 
     <td>{{{Composer|''Unknown''}}}</td>{{#if:{{{Arranger|}}}|
 
     <td>{{{Composer|''Unknown''}}}</td>{{#if:{{{Arranger|}}}|
 
     <td itemprop="musicArrangement" itemscope itemtype="http://schema.org/MusicComposition">{{{Arranger}}}</td>}}{{#if:{{{Extra4|}}}|
 
     <td itemprop="musicArrangement" itemscope itemtype="http://schema.org/MusicComposition">{{{Arranger}}}</td>}}{{#if:{{{Extra4|}}}|
 
     <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>{{#if:{{{Extra6|}}}|
+
     <td style="text-align:right;">{{{DurationMin|0}}}:{{#ifexpr:{{{DurationSec|0}}} < 10|0}}{{{DurationSec|0}}}</td>
    <td>{{{Extra6}}}</td>}}{{#if:{{{Extra7|}}}|
+
     <td>{{Song-Box|{{#if:{{{Recording|}}} | {{{Recording|}}} | {{ZeroPad|{{{Track|0}}}}}_-_{{{Game}}}_-_{{#if:{{{Platform|}}}|{{{Platform}}}_-_}}{{{TitleLink|{{{Title}}}}}}.ogg}} }}</td>
    <td>{{{Extra7}}}</td>}}
 
     <td>{{Song-List|{{#if:{{{Recording|}}} | {{{Recording|}}} | {{ZeroPad|{{{Track|0}}}}}_-_{{{Game}}}_-_{{#if:{{{Platform|}}}|{{{Platform}}}_-_}}{{{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" /><!--
  
 
Normal download link:
 
Normal download link:
  
-->[[Media:{{#if:{{{Recording|}}} | {{{Recording|}}} | {{ZeroPad|{{{Track|0}}}}}_-_{{{Game}}}_-_{{#if:{{{Platform|}}}|{{{Platform}}}_-_}}{{{Title}}}.ogg}}|Download]]<!--
+
-->[[Media:{{#if:{{{Recording|}}} | {{{Recording|}}} | {{ZeroPad|{{{Track|0}}}}}_-_{{{Game}}}_-_{{#if:{{{Platform|}}}|{{{Platform}}}_-_}}{{{TitleLink|{{{Title}}}}}}.ogg}}|Download]]<!--
  
 
Direct file link for "audio" microdata attribute:
 
Direct file link for "audio" microdata attribute:
  
--><span itemprop="audio" itemscope itemtype="http://schema.org/AudioObject"><meta itemprop="contentUrl" content="{{fullurl:Media:{{#if:{{{Recording|}}} | {{{Recording|}}} | {{ZeroPad|{{{Track|0}}}}}_-_{{{Game}}}_-_{{#if:{{{Platform|}}}|{{{Platform}}}_-_}}{{{Title}}}.ogg}}}}" /></span><!--
+
--><span itemprop="audio" itemscope itemtype="http://schema.org/AudioObject"><meta itemprop="contentUrl" content="{{fullurl:Media:{{#if:{{{Recording|}}} | {{{Recording|}}} | {{ZeroPad|{{{Track|0}}}}}_-_{{{Game}}}_-_{{#if:{{{Platform|}}}|{{{Platform}}}_-_}}{{{TitleLink|{{{Title}}}}}}.ogg}}}}" /></span><!--
  
 
Hidden content which points to the "url" microdata attribute of the song.  This picks whichever page exists first, in this order:
 
Hidden content which points to the "url" microdata attribute of the song.  This picks whichever page exists first, in this order:
Line 138: Line 137:
 
  * Current page (i.e. "Game (Platform)")
 
  * Current page (i.e. "Game (Platform)")
  
This should always return a working link. Unlike the clickable link shown on the page, this will fall back to the game's page if there's no song-specific page, to ensure the "url" microdata attribute will always take you to a useful page.
+
This should always return a working link. Unlike the clickable link shown on the page, this will fall back to the game's page if there's no song-specific page, to ensure the "url" microdata attribute will always take you to a useful page.
  
 
It would be better to put the "url" attribute on an actual link instead of a meta tag, but MediaWiki doesn't allow arbitrary tags on links.
 
It would be better to put the "url" attribute on an actual link instead of a meta tag, but MediaWiki doesn't allow arbitrary tags on links.
Line 144: Line 143:
 
--><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). Also includes a URL for the album which is the wiki page displaying the track list.
+
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.
  
 
--><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>{{#if:{{{Extra8|}}}|
+
--></td>
    <td>{{{Extra8}}}</td>}}{{#if:{{{Extra9|}}}|
 
    <td>{{{Extra9}}}</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:
  1. "Title - Game (Platform)", if that page exists (e.g. Map - Rampage (NES)).
  2. "Title - Game", if that page exists (e.g. Main Theme - Ski or Die).
  3. Otherwise the link is just Title (e.g. Map).

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
[[File:00_-_{{{Game}}}_-_{{{Title}}}.ogg |-]]
[[Media:00_-_{{{Game}}}_-_{{{Title}}}.ogg|Download]]