|
|
| Line 1: |
Line 1: |
| <!--begin short description-->{{#ifeq:{{#invoke:Is infobox in lead|main|[Ii]nfobox [Ss]ong}}|true|{{#if:{{Has short description}} |<!--Do nothing--> |{{short description|{{#invoke:Plain text|main|{{#if:{{#invoke:string|match|{{{released|}}}|%d%d%d%d|ignore_errors = true}}|{{#invoke:string|match|{{{released|}}}|%d%d%d%d|ignore_errors = true}} {{lc:{{Infobox song/link|{{{type|}}} }}}}|{{Infobox song/link|{{{type|}}} }}}} {{#if:{{{artist|}}}|by {{{artist}}} }}|noreplace}}}}}}}}<!-- end short description | | <!-- Short description --> |
| -->{{Infobox
| | {{#ifeq: {{#if:{{{type|}}}|Infobox song|}} | Infobox song |
| | | {{#if:{{{released|}}}|{{short description|{{{type|}}} by {{{artist|}}} ({{{released}}})|noreplace}}}} |
| | }} |
| | |
| | {{Infobox |
| | bodyclass = vevent | | | bodyclass = vevent |
| | | abovestyle = color: #202122; background-color: {{#if:{{{type|}}}|#f0f0f0}}; font-size: 125%; |
| | | above = "{{#if:{{{name|}}}|{{{name}}}|{{PAGENAMEBASE}}}}" {{#if:{{{version|}}}|({{{version}}})}} |
|
| |
|
| | aboveclass = summary
| | | image = {{#if:{{{image|}}}|[[File:{{{image}}}|frameless|upright={{{cover_upright|}}}|alt={{{alt|}}}]]}} |
| | abovestyle = color: #202122;background-color: {{Infobox song/color|{{{type|}}} }}; font-size: 125%;
| |
| | above = "{{if empty|{{{name|}}}|{{#if:{{{title2|}}}||{{{title|}}}}}|{{PAGENAMEBASE}}}}"{{#if:{{{version|}}}| ({{{version}}})}}
| |
| | |
| | image = {{#if:{{{image|}}}|[[File:{{{image}}}|image={{{image|{{{cover|}}}}}}|size={{{cover_size|}}}|upright={{{cover_upright|}}}|sizedefault=frameless|alt={{{alt|}}}|title={{{alt|}}}|border={{{border|}}}}} | |
| | caption = {{{caption|}}} | | | caption = {{{caption|}}} |
|
| |
|
| | headerstyle = color: #202122;background-color: {{Infobox song/color|{{{type|}}} }}; | | | headerstyle = color: #202122; background-color: {{#if:{{{type|}}}|#f0f0f0}}; |
| | headerclass = description | | | header1 = {{#if:{{{artist|}}}|{{{type|}}} by {{{artist}}}}} |
|
| |
|
| | rowclass1 = description | | | label2 = Album |
| | header1 = {{Infobox song/link|{{{type|}}} }} {{#if:{{{artist|}}}|by {{{artist}}}}} | | | data2 = {{#if:{{{album|}}}|''{{{album}}}''}} |
| | rowclass2 = description
| |
| | header2 = {{#if:{{{album|}}}|from the album '' {{If empty|{{{album|}}}}} ''|{{#if:{{{EP|}}}|from the EP '' {{{EP|}}} ''}}}}
| |
|
| |
|
| | label3 = Language | | | label3 = Language |
| Line 22: |
Line 22: |
|
| |
|
| | label4 = English title | | | label4 = English title |
| | data4 = {{{English_title|{{{english_title|}}}}}} | | | data4 = {{{English_title|}}} |
| | |
| | label5 = <span class="nowrap">[[A-side and B-side|A-side]]</span>
| |
| | data5 = {{#if:{{{A-side|}}}|{{#if:{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}C|1={{{A-side}}}|2="|nomatch=}}|{{{A-side}}}|"{{{A-side}}}"}}}}
| |
| | class5 = plainlist
| |
| | |
| | label6 = <span class="nowrap">[[A-side and B-side|B-side]]</span>
| |
| | data6 = {{#if:{{{B-side|}}}|{{#if:{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}C|1={{{B-side}}}|2="|nomatch=}}|{{{B-side}}}|"{{{B-side}}}"}}}}
| |
| | class6 = plainlist
| |
| | |
| | label7 = Written
| |
| | data7 = {{{written|}}}
| |
| | |
| | label8 = Published
| |
| | data8 = {{{published|}}}
| |
| | |
| | label10 = Released
| |
| | data10 = {{{released|}}}
| |
| | class10 = plainlist
| |
|
| |
|
| | label12 = Recorded | | | label5 = A-side |
| | data12 = {{{recorded|}}} | | | data5 = {{{A-side|}}} |
| | class12 = plainlist
| |
|
| |
|
| | label13 = [[Recording studio|Studio]]<!--this link is here deliberately; see the talk page--> | | | label6 = B-side |
| | data13 = {{{studio|}}} | | | data6 = {{{B-side|}}} |
| | class13 = plainlist
| |
|
| |
|
| | label14 = Venue | | | label7 = Released |
| | data14 = {{{venue|}}} | | | data7 = {{{released|}}} |
|
| |
|
| | label15 = [[Music genre|Genre]] | | | label8 = Recorded |
| | data15 = {{{genre|}}} | | | data8 = {{{recorded|}}} |
| | class15 = category hlist
| |
|
| |
|
| | label16 = Length | | | label9 = Studio |
| | data16 = {{#invoke:hms|main|duration={{{length|}}}}} | | | data9 = {{{studio|}}} |
| | class16 = plainlist
| |
|
| |
|
| | label17 = [[Record label|Label]] | | | label10 = Genre |
| | data17 = {{{label|}}} | | | data10 = {{{genre|}}} |
| | class17 = hlist
| |
|
| |
|
| | label40 = <span class="nowrap">[[Songwriter|Songwriter(s)]]</span><!--this link is here deliberately; see the talk page--> | | | label11 = Length |
| | data40 = {{{writer|}}} | | | data11 = {{{length|}}} |
| | class40 = hlist
| |
|
| |
|
| | label41 = <span class="nowrap">[[Composer|Composer(s)]]</span><!--this link is here deliberately; see the talk page--> | | | label12 = Label |
| | data41 = {{{composer|}}} | | | data12 = {{{label|}}} |
| | class41 = hlist
| |
|
| |
|
| | label42 = <span class="nowrap">[[Lyricist|Lyricist(s)]]</span> | | | label13 = Songwriter(s) |
| | data42 = {{{lyricist|}}} | | | data13 = {{{writer|}}} |
| | class42 = hlist
| |
|
| |
|
| | label43 = <span class="nowrap">[[Record producer|Producer(s)]]</span><!--this link is here deliberately; see the talk page--> | | | label14 = Producer(s) |
| | data43 = {{{producer|}}} | | | data14 = {{{producer|}}} |
| | class43 = hlist
| |
|
| |
|
| | header44 = {{#if:{{{tracks|}}}||{{#if:{{{prev_title|}}}{{{next_title|}}}|{{#if:{{{chronology|}}}|{{#invoke:String|replace|error_category=Music infoboxes with Module:String errors{{!}}C|{{{chronology}}}{{#switch:{{lc:{{{type|}}}}}|single|[[single (music)|single]]|singles|[[single (music)|singles]]= singles}}|singles singles|singles}}|{{#ifeq: {{str letter|{{delink| {{{artist|}}} }}}}|0|{{{artist|}}}|{{#invoke:String2 | ucfirst |{{{artist|}}}}}}} singles}} chronology}}}} | | | below = {{{misc|}}} |
| | }} |
| | <noinclude> |
| | == Documentation == |
| | This template provides a non-Lua infobox for song articles. |
|
| |
|
| | data45 = {{#if:{{{tracks|}}}||{{#if:{{{prev_title|}}}{{{next_title|}}}|
| | === Usage === |
| {{(!}} style="background: transparent; color: inherit; width: 100%; min-width: 100%; border-collapse: collapse; display: inline-table;"
| | <syntaxhighlight lang="mediawiki"> |
| {{!}}- style="line-height: 1.4em;"
| | {{Infobox song |
| {{!}} style="width: 33%; text-align: center; vertical-align: top; padding: .2em .1em .2em 0;" {{!}} {{#if:{{{prev_title|}}}|"{{{prev_title|}}}" {{#if:{{{prev_version|}}}|({{{prev_version}}}) }}{{#if:{{{prev_title2|}}}| / "{{{prev_title2|}}}"}}{{#if:{{{prev_year|}}}|<br />({{{prev_year|}}})}} }}
| | | name = Song title |
| {{!}} style="width: 33%; text-align: center; vertical-align: top; padding:.2em .1em;" {{!}} {{#if:{{{title2|}}}|"{{if empty|{{#switch:{{{title|}}}|{{BASEPAGENAME}}|{{PAGENAMEBASE}}='''{{{title}}}'''|{{{title|}}}}}|'''{{if empty|{{{name|}}}|{{PAGENAMEBASE}}}}'''}}"{{#if:{{{version|}}}| ({{{version}}})}} / "{{#switch:{{{title2}}}|{{BASEPAGENAME}}|{{PAGENAMEBASE}}='''{{{title2}}}'''|{{{title2}}}}}"|"'''{{if empty|{{{name|}}}|{{{title|}}}|{{PAGENAMEBASE}}}}'''"{{#if:{{{version|}}}| ({{{version}}})}}}} {{#if:{{{prev_year|}}}{{{next_year|}}}|<br />({{{year|{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}C|{{{released|}}}|%d%d%d+}}}}})}}
| | | artist = Artist name |
| {{!}} style="width: 33%; text-align: center; vertical-align: top; padding: .2em 0 .2em .1em;" {{!}} {{#if:{{{next_title|}}}|"{{{next_title|}}}" {{#if:{{{next_version|}}}|({{{next_version}}}) }}{{#if:{{{next_title2|}}}| / "{{{next_title2|}}}"}}{{#if:{{{next_year|}}}|<br />({{{next_year|}}})}} }}
| | | type = Single |
| {{!)}}
| | | album = Album name |
| }}}}
| | | released = Release date |
| | | recorded = Recording year |
| | | studio = Recording studio |
| | | genre = Music genre |
| | | length = Duration of the song |
| | | label = Record label |
| | | writer = Songwriter(s) |
| | | producer = Producer(s) |
| | }} |
| | </syntaxhighlight> |
|
| |
|
| | header62 = {{#if:{{{tracks|}}}| {{#if: {{{chronology|}}}|{{{chronology}}}|{{#if:{{{album|}}}{{{EP|}}}|''{{{album|}}}{{{EP|}}}'' {{nowrap|track listing}}|Track listing}} }} }}
| | === Notes === |
| | rowcellstyle63 = {{#if:{{{tracks|}}}|text-align:left}}
| | - Fields left empty will not be displayed. |
| | data63 = {{{tracks|}}}
| | - Default colors are applied for missing fields. |
|
| |
|
| | below = {{{misc|}}}
| |
| }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox song with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox song]] with unknown parameter "_VALUE_"|ignoreblank=y | type | EP | writer | title2 | tracks | recorded | length | prev_track | next_track | chronology | name | title | image | cover | cover_size | cover_upright | alt | border | caption | artist | album | language | English_title | english_title | A-side | B-side | written | published | released | studio | venue | genre | label | composer | lyricist | producer | prev_title | next_title | prev_title2 | prev_year | next_year | year | next_title2 | misc | version | prev_version | next_version}}{{main other|{{#if:{{{length|}}}|{{#if:{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}C|1={{#invoke:hms|main|duration={{{length|}}}}}|2=class="duration"|plain=true|nomatch=}}|[[Category:Articles with hAudio microformats]]}}{{#if:{{{writer|}}}{{{composer|}}}{{{lyricist|}}}||[[Category:Song articles with missing songwriters]]}}{{#if:{{both|{{{writer|}}}|{{{composer|}}}}}|[[Category:Song articles with both composer and songwriter]]}}{{#if:{{both|{{{writer|}}}|{{{lyricist|}}}}}|[[Category:Song articles with both lyricist and songwriter]]}}{{#if:{{{lyricist|}}}|{{#if:{{{composer|}}}||[[Category:Song articles with lyricist but not composer]]}}}}}}{{#if:{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}C|1={{{name|}}}{{{cover|}}}{{{cover_size|}}}{{{alt|}}}{{{border|}}}{{{caption|}}}{{{type|}}}{{{artist|}}}{{{album|}}}{{{EP|}}}{{{language|}}}{{{English_title|}}}{{{writer|}}}{{{composer|}}}{{{lyricist|}}}{{{written|}}}{{{published|}}}{{{genre|}}}{{{recorded|}}}{{{studio|}}}{{{venue|}}}{{{length|}}}{{{producer|}}}{{{released|}}}{{{label|}}}{{{A-side|}}}{{{B-side|}}}{{{chronology|}}}{{{prev_title|}}}{{{prev_title2|}}}{{{prev_year|}}}{{{title|}}}{{{title2|}}}{{{year|}}}{{{next_title|}}}{{{next_title2|}}}{{{next_year|}}}{{{tracks|}}}{{{image|}}}{{{english_title|}}}x|2=</?t[drh][ >]|nomatch=}}|[[Category:Music infoboxes with malformed table placement|S]]}}}}<noinclude>
| |
| <!-- please place category links on the /doc page; interwiki links to Wikidata, thank you! -->
| |
| {{documentation}}
| |
| </noinclude> | | </noinclude> |
| Album | |
| Language | |
| English title | |
| A-side | |
| B-side | |
| Released | |
| Recorded | |
| Studio | |
| Genre | |
Documentation[edit]
This template provides a non-Lua infobox for song articles.
{{Infobox song
| name = Song title
| artist = Artist name
| type = Single
| album = Album name
| released = Release date
| recorded = Recording year
| studio = Recording studio
| genre = Music genre
| length = Duration of the song
| label = Record label
| writer = Songwriter(s)
| producer = Producer(s)
}}
- Fields left empty will not be displayed.
- Default colors are applied for missing fields.