Template:Track listing/doc
This is a documentation subpage for
Template documentation[edit]
Template sandbox and testcases for TEMPLATE_NAME[edit]Overview[edit]This page provides a clean workflow to safely edit and validate TEMPLATE_NAME:
Use this page to:
Quick links[edit]
How to test[edit]1. Edit the sandbox at Template:TEMPLATE_NAME/sandbox. 2. Open this test page and click “Show preview” to render the sandbox with inputs below. 3. Verify each testcase: Does the “Actual output” match the “Expected output”? 4. If all pass, consider copying sandbox to live using an edit summary like: “Sync from /sandbox: passes all /testcases as of YYYY-MM-DD.” Previewing tips[edit]
Test harness[edit]The following sections render the sandbox template against curated inputs. Each testcase shows:
Testcase A: Minimal invocation[edit]Parameters: {{TEMPLATE_NAME}} Expected output: [Minimal successful output with defaults: e.g., a neutral message or basic box] Actual output (sandbox): Character and language test sandbox This sandbox is used to test how Template:TEMPLATE NAME behaves with special characters (such as Greek letters) and language-specific spans. Basic examples[edit]
Within the template[edit]Below are example calls of the template using these characters as parameters. {{TEMPLATE NAME | title = Greek test: α γ | summary = Demonstrating Greek letters: α, β, γ, and entities like γ. | attr1 = Direct Greek: α β γ δ | attr2 = Entity Greek: α β γ δ | attr3 = German label: <span lang="de">A</span>, English label: A }} Preview the page to check if:
Notes[edit]
Testcase B: Common parameters[edit]Parameters: {{TEMPLATE_NAME | param1 = Alpha | param2 = Beta | flag = yes }} Expected output: [Example: shows "Alpha" and "Beta" in designated slots; flag toggles enhanced styling] Actual output (sandbox): Character and language test sandbox This sandbox is used to test how Template:TEMPLATE NAME behaves with special characters (such as Greek letters) and language-specific spans. Basic examples[edit]
Within the template[edit]Below are example calls of the template using these characters as parameters. {{TEMPLATE NAME | title = Greek test: α γ | summary = Demonstrating Greek letters: α, β, γ, and entities like γ. | attr1 = Direct Greek: α β γ δ | attr2 = Entity Greek: α β γ δ | attr3 = German label: <span lang="de">A</span>, English label: A }} Preview the page to check if:
Notes[edit]
Testcase C: Edge values and escaping[edit]Parameters: {{TEMPLATE_NAME | param1 = [[Linked target|Visible text]] | param2 = {{subst:CURRENTTIMESTAMP}} | raw = <code><span class="x">escaped</span></code> }} Expected output: [Links render correctly; timestamp subst is literal in expected; raw shows escaped markup] Actual output (sandbox): Character and language test sandbox This sandbox is used to test how Template:TEMPLATE NAME behaves with special characters (such as Greek letters) and language-specific spans. Basic examples[edit]
Within the template[edit]Below are example calls of the template using these characters as parameters. {{TEMPLATE NAME | title = Greek test: α γ | summary = Demonstrating Greek letters: α, β, γ, and entities like γ. | attr1 = Direct Greek: α β γ δ | attr2 = Entity Greek: α β γ δ | attr3 = German label: <span lang="de">A</span>, English label: A }} Preview the page to check if:
Notes[edit]
Testcase D: Internationalization (i18n)[edit]Parameters: {{TEMPLATE_NAME | lang = ja | text = こんにちは世界 }} Expected output: [Text displays correctly for non-ASCII; applies lang attribute or rtl/ltr where applicable] Actual output (sandbox): Character and language test sandbox This sandbox is used to test how Template:TEMPLATE NAME behaves with special characters (such as Greek letters) and language-specific spans. Basic examples[edit]
Within the template[edit]Below are example calls of the template using these characters as parameters. {{TEMPLATE NAME | title = Greek test: α γ | summary = Demonstrating Greek letters: α, β, γ, and entities like γ. | attr1 = Direct Greek: α β γ δ | attr2 = Entity Greek: α β γ δ | attr3 = German label: <span lang="de">A</span>, English label: A }} Preview the page to check if:
Notes[edit]
Testcase E: Error handling[edit]Parameters: {{TEMPLATE_NAME | param1 = | required = <!-- intentionally omitted --> }} Expected output: [Shows a gentle error or maintenance category; does not break page layout] Actual output (sandbox): Character and language test sandbox This sandbox is used to test how Template:TEMPLATE NAME behaves with special characters (such as Greek letters) and language-specific spans. Basic examples[edit]
Within the template[edit]Below are example calls of the template using these characters as parameters. {{TEMPLATE NAME | title = Greek test: α γ | summary = Demonstrating Greek letters: α, β, γ, and entities like γ. | attr1 = Direct Greek: α β γ δ | attr2 = Entity Greek: α β γ δ | attr3 = German label: <span lang="de">A</span>, English label: A }} Preview the page to check if:
Notes[edit]
Maintenance[edit]
Categories[edit]Copy-paste skeletons[edit]Below are ready-to-use skeletons for the sandbox and testcases subpages. Skeleton: Template:TEMPLATE_NAME/sandbox[edit]<!-- Sandbox for TEMPLATE_NAME --> <!-- Copy the entire template source here; edit safely. --> {{#if:{{{required|}}} | <!-- normal output --> <div class="tmpl"> <b>{{{param1|}}}</b> · <i>{{{param2|}}}</i> {{#if:{{{flag|}}}|<span class="flag">✓</span>|}} {{#if:{{{raw|}}}|<span class="raw">{{{raw}}}</span>|}} </div> | <!-- error / missing required --> <span class="error">TEMPLATE_NAME: missing required parameter</span> [[Category:Pages with TEMPLATE_NAME errors]] }} Skeleton: Template:TEMPLATE_NAME/testcases[edit]<!-- Testcases for TEMPLATE_NAME; render against /sandbox --> ; Minimal : {{TEMPLATE_NAME/sandbox}} ; Common params : {{TEMPLATE_NAME/sandbox | param1 = Alpha | param2 = Beta | flag = yes }} ; Edge and escaping : {{TEMPLATE_NAME/sandbox | param1 = [[Linked target|Visible text]] | param2 = 20250101T000000Z | raw = <code><span class="x">escaped</span></code> }} ; I18n : {{TEMPLATE_NAME/sandbox | lang = ja | text = こんにちは世界 }} ; Error handling : {{TEMPLATE_NAME/sandbox | required = }} Review checklist[edit]
Template:Terminate sentence ensures a sentence ends with a specified terminator (default: a period). It avoids adding duplicate terminators and can optionally trim trailing spaces. It attempts to ignore trailing closing quotes or brackets when deciding whether a terminator is already present. Usage[edit]Basic: {{Terminate sentence|This is a sentence}}
→ This is a sentence.
Named parameters: {{Terminate sentence
|text=He said "Hello"
|term=.
}}
→ He said "Hello".
Custom terminator: {{Terminate sentence|text=Warning|term=!}}
→ Warning!
Avoid duplicate terminator: {{Terminate sentence|text=Already done.|term=.}}
→ Already done.
Trim trailing spaces: {{Terminate sentence|text=Ends with space |trim=yes}}
→ Ends with space.
Skip processing: {{Terminate sentence|text=No changes here|skip=yes}}
→ No changes here
Append a note: {{Terminate sentence|text=Complete|note=(source: 2025)}}
→ Complete. (source: 2025)
Parameters[edit]
Behavior details[edit]
Examples[edit]
{{Terminate sentence|text=He whispered "hush"|term=.}}
→ He whispered "hush".
{{Terminate sentence|text=Complete (verified)|term=.}}
→ Complete (verified).
{{Terminate sentence|text=Alert|term=!}}
→ Alert!
{{Terminate sentence|text=Wait...|term=.|allowdup=yes}}
→ Wait.... Best practices[edit]
Lua-powered variant (optional)[edit]For more robust detection (including multilingual quotes and punctuation), create -- Module:TerminateUtil
local M = {}
local closing = {
[")"] = true, ["]"] = true, ["}"] = true,
['"'] = true, ["'"] = true, ["”"] = true, ["’"] = true, ["»"] = true, ["›"] = true
}
local function trimRight(s)
return (s:gsub("%s+$",""))
end
function M.lastVisibleChar(args)
local s = args.s or ""
s = trimRight(s)
local i = #s
while i > 0 do
local c = s:sub(i,i)
if closing[c] then
i = i - 1
else
return c
end
end
return ""
end
return M
Then update the template to call: {{#invoke:TerminateUtil|lastVisibleChar|s=text}}
This improves detection for closing quotes and brackets. See also[edit]It may contain usage information, categories and other content that is not part of the original template page. |
Usage
[edit]{{Track listing
| collapsed =
| headline =
| extra_column =
| total_length =
| all_writing =
| all_lyrics =
| all_music =
| writing_credits =
| lyrics_credits =
| music_credits =
| title1 =
| note1 =
| writer1 =
| lyrics1 =
| music1 =
| extra1 =
| length1 =
| title2 =
| note2 =
| writer2 =
| lyrics2 =
| music2 =
| extra2 =
| length2 =
| title3 =
| note3 =
| writer3 =
| lyrics3 =
| music3 =
| extra3 =
| length3 =
| title4 =
| note4 =
| writer4 =
| lyrics4 =
| music4 =
| extra4 =
| length4 =
| title5 =
| note5 =
| writer5 =
| lyrics5 =
| music5 =
| extra5 =
| length5 =
| title6 =
| note6 =
| writer6 =
| lyrics6 =
| music6 =
| extra6 =
| length6 =
| title7 =
| note7 =
| writer7 =
| lyrics7 =
| music7 =
| extra7 =
| length7 =
| title8 =
| note8 =
| writer8 =
| lyrics8 =
| music8 =
| extra8 =
| length8 =
| title9 =
| note9 =
| writer9 =
| lyrics9 =
| music9 =
| extra9 =
| length9 =
| title10 =
| note10 =
| writer10 =
| lyrics10 =
| music10 =
| extra10 =
| length10 =
| title11 =
| note11 =
| writer11 =
| lyrics11 =
| music11 =
| extra11 =
| length11 =
| title12 =
| note12 =
| writer12 =
| lyrics12 =
| music12 =
| extra12 =
| length12 =
| title13 =
| note13 =
| writer13 =
| lyrics13 =
| music13 =
| extra13 =
| length13 =
| title14 =
| note14 =
| writer14 =
| lyrics14 =
| music14 =
| extra14 =
| length14 =
| title15 =
| note15 =
| writer15 =
| lyrics15 =
| music15 =
| extra15 =
| length15 =
| title16 =
| note16 =
| writer16 =
| lyrics16 =
| music16 =
| extra16 =
| length16 =
| title17 =
| note17 =
| writer17 =
| lyrics17 =
| music17 =
| extra17 =
| length17 =
| title18 =
| note18 =
| writer18 =
| lyrics18 =
| music18 =
| extra18 =
| length18 =
| title19 =
| note19 =
| writer19 =
| lyrics19 =
| music19 =
| extra19 =
| length19 =
| title20 =
| note20 =
| writer20 =
| lyrics20 =
| music20 =
| extra20 =
| length20 =
...
| title119 =
| note119 =
| writer119 =
| lyrics119 =
| music119 =
| extra119 =
| length119 =
}}
Parameters
[edit]| Parameter | Description |
|---|---|
|collapsed= |
Include this parameter with the value Template:Var (|collapsed=yes) to have the track listing table start out collapsed. Useful for very long lists or pages with several lists. This parameter only takes effect in JavaScript-enabled browsers. |
|headline= |
An optional headline, to denote sides/disc numbers of an album (e.g., Template:Kbd, Template:Kbd, etc.) or in case of some works, special groups or cycles of songs. The default font-weight of the headline is bold. The {{nobold}} template can be used to have part or all of the headline appear in the normal font-weight. The headline "Track listing" (without the quotes) is added by default. Use the headline option to replace that text where needed. |
|extra_column= |
Used to both enable and set the header for an additional column to hold per-track information. If this option is not used, no extra column will be shown. Use sparingly, in order to keep the overall column count to a minimum and if the respective type of data is not available for most tracks consider using the note fields instead. Some suggested headers: Template:Kbd (compilations), Template:Kbd (cover albums), Template:Kbd, Template:Kbd (remix albums). |
|total_length= |
Used to display the total length of the record at the bottom of the list. Not necessary in most cases (as that information will usually be covered by an infobox), but useful in some (e.g., releases with a lot of individual discs). |
|all_writing=|all_lyrics=|all_music= |
Used to display general songwriting credits for the entire record in a note above the track listing. If all_writing is supplied, the other two parameters are ignored. |
|writing_credits= |
Include this parameter with the value Template:Var (i.e., |writing_credits=yes) to turn on a column for track-specific songwriting credits. Avoid redundancy, if all or most songs on a record were written by the same person(s), consider using the all_writing option and note fields for exceptions. Note that the writing_credits option disables the lyrics_credits and music_credits options. |
|lyrics_credits=|music_credits= |
Include these parameters with the value Template:Var (i.e. |lyrics_credits=yes) to turn on columns for track-specific lyrics and music credits. Avoid redundancy, if the lyrics or music of most songs on a record can be attributed to the same person(s), consider using the all_lyrics and all_music options respectively, along with note fields for exceptions. Note that the writing_credits option disables the lyrics_credits and music_credits options. |
|titleTemplate:Var= |
(i.e., title1, title2, etc.) The title of the respective track. Note that a track listing does not have to start with a #1 or continue with 1, 2, 3... order (e.g., for having side B of an LP start at track six or leaving out empty tracks preceding a bonus track). Track names are automatically put into quotes, unless the field is left empty, in which case the track name will display as Template:Samp (without quotes). This is used for when no title is given to a track in any form on the album or media that is officially related to the album. |
|noteTemplate:Var= |
(i.e., note1, note2, etc.) An optional note to be displayed in parentheses behind the title. Useful for original titles in other languages/scripts (e.g., kanji) or to denote bonus tracks only included in certain editions. Keep notes short. Excessive commentary disrupts the flow of the track listing, which should be easily scannable. |
|writerTemplate:Var=|lyricsTemplate:Var=|musicTemplate:Var= |
(i.e., writer1, writer2, etc.) Use to denote the writer(s) of the track in general or of the lyrics or music individually. Remember to turn on the desired columns with the parameters ending with _credits (see above) and avoid redundancy where possible. |
|extraTemplate:Var= |
(i.e., extra1, extra2, etc.) Holds the content of the user-set column for the respective track (see extra_column). |
|lengthTemplate:Var= |
(i.e., length1, length2, etc.) The length of the track in a Template:Var formatting (or Template:Var or even Template:Var if particularly long tracks occur). For example: Template:Kbd |
Examples
[edit]The Beatles (The White Album) by The Beatles
[edit]The collapsed and headline options, general songwriting credits:
All songs written and composed by Lennon–McCartney, except where noted.
| Side one | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| No. | Title | Length | ||||||||
| 1. | "Back in the U.S.S.R." | 2:43 | ||||||||
| 2. | "Dear Prudence" | 3:56 | ||||||||
| 3. | "Glass Onion" | 2:17 | ||||||||
| 4. | "Ob-La-Di, Ob-La-Da" | 3:08 | ||||||||
| 5. | "Wild Honey Pie" | 0:52 | ||||||||
| 6. | "The Continuing Story of Bungalow Bill" | 3:13 | ||||||||
| 7. | "While My Guitar Gently Weeps" (George Harrison) | 4:45 | ||||||||
| 8. | "Happiness Is a Warm Gun" | 2:43 | ||||||||
| Side two | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| No. | Title | Length | ||||||||
| 9. | "Martha My Dear" | 2:28 | ||||||||
| 10. | "I'm So Tired" | 2:03 | ||||||||
| 11. | "Blackbird" | 2:18 | ||||||||
| 12. | "Piggies" (Harrison) | 2:04 | ||||||||
| 13. | "Rocky Raccoon" | 3:32 | ||||||||
| 14. | "Don't Pass Me By" (Ringo Starr) | 3:50 | ||||||||
| 15. | "Why Don't We Do It in the Road?" | 1:40 | ||||||||
| 16. | "I Will" | 1:45 | ||||||||
| 17. | "Julia" | 2:54 | ||||||||
| Side three | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| No. | Title | Length | ||||||||
| 1. | "Birthday" | 2:42 | ||||||||
| 2. | "Yer Blues" | 4:00 | ||||||||
| 3. | "Mother Nature's Son" | 2:47 | ||||||||
| 4. | "Everybody's Got Something to Hide Except Me and My Monkey" | 2:24 | ||||||||
| 5. | "Sexy Sadie" | 3:15 | ||||||||
| 6. | "Helter Skelter" | 4:29 | ||||||||
| 7. | "Long, Long, Long" (Harrison) | 3:03 | ||||||||
| Side four | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| No. | Title | Length | ||||||||
| 8. | "Revolution 1" | 4:15 | ||||||||
| 9. | "Honey Pie" | 2:40 | ||||||||
| 10. | "Savoy Truffle" (Harrison) | 2:54 | ||||||||
| 11. | "Cry Baby Cry" | 3:02 | ||||||||
| 12. | "Revolution 9" | 8:13 | ||||||||
| 13. | "Good Night" | 3:11 | ||||||||
Greatest Hits by Queen
[edit]Per-track notes and writing credits, total_length option:
| 1981 UK edition | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| No. | Title | Writer(s) | Length | |||||||
| 1. | "Bohemian Rhapsody" (from A Night at the Opera, 1975) | Freddie Mercury | 5:55 | |||||||
| 2. | "Another One Bites the Dust" (from The Game, 1980) | John Deacon | 3:36 | |||||||
| 3. | "Killer Queen" (from Sheer Heart Attack, 1974) | Mercury | 2:57 | |||||||
| 4. | "Fat Bottomed Girls" (single version, from Jazz, 1978) | Brian May | 4:16 | |||||||
| 5. | "Bicycle Race" (from Jazz, 1978) | Mercury | 3:01 | |||||||
| 6. | "You're My Best Friend" (from A Night at the Opera, 1975) | Deacon | 2:52 | |||||||
| 7. | "Don't Stop Me Now" (from Jazz, 1978) | Mercury | 3:29 | |||||||
| 8. | "Save Me" (from The Game, 1980) | May | 3:48 | |||||||
| 9. | "Crazy Little Thing Called Love" (from The Game, 1980) | Mercury | 2:42 | |||||||
| 10. | "Somebody to Love" (from A Day at the Races, 1976) | Mercury | 4:56 | |||||||
| 11. | "Now I'm Here" (from Sheer Heart Attack, 1974) | May | 4:10 | |||||||
| 12. | "Good Old-Fashioned Lover Boy" (from A Day at the Races, 1976) | Mercury | 2:54 | |||||||
| 13. | "Play the Game" (from The Game, 1980) | Mercury | 3:33 | |||||||
| 14. | "Flash" (single version, from Flash Gordon, 1980) | May | 2:48 | |||||||
| 15. | "Seven Seas of Rhye" (from Queen II, 1974) | Mercury | 2:47 | |||||||
| 16. | "We Will Rock You" (from News of the World, 1977) | May | 2:01 | |||||||
| 17. | "We Are the Champions" (from News of the World, 1977) | Mercury | 2:59 | |||||||
Total length: |
57:20 | |||||||||
Smile by L'Arc-en-Ciel
[edit]Individual per-track credits for music and lyrics, original song titles in the notes field:
| No. | Title | Lyrics | Music | Length | |
|---|---|---|---|---|---|
| 1. | "Kiss" (Template:Nihongo2 Kuchizuke) | Hyde | Ken | 4:25 | |
| 2. | "Ready Steady Go" | Hyde | Tetsu | 3:45 | |
| 3. | "Lover Boy" | Ken | Ken | 4:45 | |
| 4. | "Feeling Fine" | Hyde | Ken | 4:17 | |
| 5. | "Time Goes On" | Tetsu | Tetsu | 4:44 | |
| 6. | "Coming Closer" | Hyde | Ken | 5:14 | |
| 7. | "Forever" (Template:Nihongo2 Eien) | Hyde | Hyde | 4:39 | |
| 8. | "Revelation" | Hyde | Yukihiro | 3:18 | |
| 9. | "Living in Your Eyes" (Template:Nihongo2 Hitomi no Jyūnin) | Hyde | Tetsu | 5:55 | |
| 10. | "Spirit Dreams Inside -Another Dream-" | Hyde | Hyde | 3:47 | |
| 11. | "Ready Steady Go (Hydeless Version)" (US release only) | Hyde | Tetsu | 3:47 |
Yeah! by Def Leppard
[edit]Using the extra_column option to denote each song's original artist.
| No. | Title | Writer(s) | Original artist | Length | |
|---|---|---|---|---|---|
| 1. | "20th Century Boy" | Marc Bolan | T. Rex | 3:41 | |
| 2. | "Rock On" | David Essex | David Essex | 2:53 | |
| 3. | "Hanging on the Telephone" | Jack Lee | The Nerves | 2:23 | |
| 4. | "Waterloo Sunset" | Ray Davies | The Kinks | 3:38 | |
| 5. | "Hell Raiser" | Mike Chapman, Nicky Chinn | Sweet | 3:20 | |
| 6. | "10538 Overture" | Jeff Lynne | Electric Light Orchestra | 4:31 | |
| 7. | "Street Life" | Bryan Ferry | Roxy Music | 3:26 | |
| 8. | "Drive-In Saturday" | David Bowie | David Bowie | 4:07 | |
| 9. | "Little Bit of Love" | Paul Rodgers, Paul Kossoff, Andy Fraser, Simon Kirke | Free | 2:34 | |
| 10. | "The Golden Age of Rock 'n' Roll" | Ian Hunter | Mott the Hoople | 3:28 | |
| 11. | "No Matter What" | Pete Ham | Badfinger | 2:57 | |
| 12. | "He's Gonna Step on You Again" | John Kongos, Christos Demetriou | John Kongos | 4:05 | |
| 13. | "Don't Believe a Word" | Phil Lynott | Thin Lizzy | 2:19 | |
| 14. | "Stay with Me" | Rod Stewart, Ronnie Wood | Faces | 4:30 |
Presets
[edit]For editing convenience, here are presets for the various possible track listing configurations. While not all presets are that long, the template supports up to 119 tracks in any configuration. Before saving a track listing created with one of these, consider to remove fields that are likely to remain empty in the foreseeable future.
- Title, Length (with notes/extra column/notes and extra column)
- Title, Writer(s), Length (with notes/extra column/notes and extra column)
- Title, Lyrics, Length (with notes/extra column/notes and extra column)
- Title, Music, Length (with notes/extra column/notes and extra column)
- Title, Lyrics, Music, Length (with notes/extra column/notes and extra column)
See also
[edit]- {{Infobox album}}
- {{Infobox single}}
- {{Infobox song}}