Template:Infobox album: Difference between revisions
(Upper-case first letter of artist name in Chronology header (unless chronology= is set); see talk page) |
MusikAnimal (talk | contribs) No edit summary |
||
(84 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ | <noinclude>{{#cargo_declare:_table=albums | ||
| name = String(mandatory=1) | |||
| cover = File | |||
| type = List (,) of String (mandatory=1;allowed values=ep,studio,demo,live,compilation,box set,video,tribute,bootleg,promotional) | |||
| artist = Page (mandatory=1;allowed values=The Smashing Pumpkins,Billy Corgan,James Iha,Jimmy Chamberlin Complex,Zwan,Various artists) | |||
| studio = List (,) of String | |||
| producer = List (,) of Page | |||
| engineer = List (,) of Page | |||
| released = Date | |||
| discogs = Integer | |||
| musicbrainz = String | |||
}}</noinclude><includeonly>{{#cargo_store:_table=albums | |||
| name = {{{name|{{PAGENAME}}}}} | |||
| cover = {{#if:{{{image|{{{cover|}}}}}}|{{{image|{{{cover|}}}}}}|{{album image|{{{name|{{PAGENAME}}}}}}}}} | |||
| type = {{lc:{{{type|{{{Type|}}}}}}}} | |||
| artist = {{#invoke:String2|ucfirst|{{delink|{{{artist|}}}}}}} | |||
| studio = {{#invoke:String2|ucfirst|{{delink|{{{studio|}}}}}}} | |||
| producer = {{#invoke:String2|ucfirst|{{delink|{{{producer|}}}}}}} | |||
| engineer = {{#invoke:String2|ucfirst|{{delink|{{{engineer|}}}}}}} | |||
| released = {{{released_cargo|{{{released|}}}}}} | |||
| discogs = {{{discogs|}}} | |||
| musicbrainz = {{{musicbrainz|}}} | |||
}}{{#invoke:Infobox album|categories|{{lc:{{{type|{{{Type|}}}}}}}}|{{#invoke:String2|ucfirst|{{delink|{{{artist|}}}}}}}}}</includeonly>{{Infobox | |||
| italic title= {{{italic_title|<noinclude>no</noinclude>}}} | | italic title= {{{italic_title|<noinclude>no</noinclude>}}} | ||
| bodyclass = vevent haudio | | bodyclass = vevent haudio | ||
| aboveclass = summary album | | aboveclass = summary album | ||
| abovestyle = | | abovestyle = font-style: italic; background-color:{{Infobox album/color|{{{type|}}}}} | ||
| above = {{#if:{{{name|}}}|{{{name}}}|<includeonly><span style="font-style: normal">Untitled</span></includeonly>}} | | above = {{#if:{{{name|}}}|{{{name}}}|<includeonly><span style="font-style: normal">Untitled</span></includeonly>}} | ||
| image = {{#invoke:InfoboxImage|InfoboxImage|image={{#switch:{{{image|{{{cover|}}}}}}|blank=|???=Nocover.png|#default={{{image|{{{cover|}}}}}}}}|border={{{border|}}}|alt={{{alt|}}}}} | | image = {{#invoke:InfoboxImage|InfoboxImage|image={{#switch:{{{image|{{{cover|}}}}}}|blank=|???=Nocover.png|#default={{{image|{{{cover|{{album image|{{{name|{{PAGENAME}}}}}}}}}}}}}|border={{{border|}}}|alt={{{alt|}}}}}}} | ||
| caption = {{{caption|}}} | | caption = {{{caption|}}} | ||
| headerstyle = background-color: | | headerstyle = background-color:{{Infobox album/color|{{{type|}}}}} | ||
| headerclass = description | | headerclass = description | ||
| header1 = <includeonly>{{Infobox album/link|{{{type|}}} }}</includeonly>{{#if:{{{longtype|}}}| {{{longtype|}}}}}{{#if:{{{artist|}}}| by <div class="contributor" style="display:inline">{{{artist|}}}</div> }} | | header1 = <includeonly>{{Infobox album/link|{{{type|}}} }}</includeonly>{{#if:{{{longtype|}}}| {{{longtype|}}}}}{{#if:{{{artist|}}}| {{#if:{{#pos:{{{type|}}}|bootleg}}|of|by}} <div class="contributor" style="display:inline">{{#ifexist:{{delink|{{{artist|}}}}}|[[{{delink|{{{artist}}}}}]]|{{{artist|}}}}}</div> }} | ||
| label2 = Released | | label2 = Released | ||
| data2 = {{{released|}}} | | data2 = {{{released|}}}{{#if:{{{released_ref|}}}|{{{released_ref}}}}} | ||
| class2 = published | | class2 = published | ||
| label3 = Recorded | | label3 = {{#if:{{{recorded|}}}|Recorded|[[Studio sessions]]}} | ||
| data3 = {{{recorded|}}} | | data3 = {{#if:{{{recorded|}}}|{{{recorded|}}}{{#if:{{{recorded_ref|}}}|{{{recorded_ref}}}}}|<includeonly>{{#invoke:infobox_album|studio_sessions|{{{name|{{PAGENAME}}}}}}}</includeonly>}} | ||
| class3 = plainlist | | class3 = plainlist | ||
| label4 = Venue | | label4 = Venue | ||
| data4 = {{{venue|}}} | | data4 = {{{venue|}}} | ||
| label5 = Studio | | label5 = [[:Category:Albums by studio|Studio]] | ||
| data5 = {{{studio|}}} | | data5 = {{#if:{{{studio|}}}|{{#invoke:link|studio|{{{studio}}}}}}} | ||
| class5 = plainlist | | class5 = plainlist | ||
| label6 = | | label6 = Genre | ||
| data6 = | | data6 = {{{genre|}}} | ||
| class6 = category hlist | | class6 = category hlist | ||
| label7 = Length | | label7 = Length | ||
Line 35: | Line 55: | ||
| data8 = {{{language|}}} | | data8 = {{{language|}}} | ||
| class8 = category | | class8 = category | ||
| label9 = [[ | | label9 = [[:Category:Albums by record label|Label]] | ||
| data9 = {{{label|}}} | | data9 = {{{label|}}} | ||
| class9 = hlist | | class9 = hlist | ||
| label10 = | | label10 = Director | ||
| data10 = {{{director|}}} | | data10 = {{{director|}}} | ||
| class10 = hlist | | class10 = hlist | ||
| label11 = [[ | | label11 = [[:Category:Albums by producer|Producer]] | ||
| data11 = {{{producer|}}} | | data11 = {{#invoke:Link|producer|{{delink|{{{producer|}}}}}|{{{name|{{PAGENAME}}}}}|Album}} | ||
| class11 = hlist | | class11 = hlist | ||
| label12 = | | label12 = Format | ||
| data12 = {{{ | | data12 = {{{format|}}} | ||
| class12 = hlist | | class12 = hlist | ||
| header13 = {{#ifeq:{{#invoke:Chronology|check|{{delink|{{{artist|}}}}}|albums|{{delink|{{{name|{{PAGENAME}}}}}}}}}|true|{{#ifexist:{{delink|{{{artist|}}}}}|[[{{#invoke:String2 | ucfirst |{{delink|{{{artist|}}}}}}}]] chronology}}}} | |||
| header13 = {{# | | data14 = <includeonly>{{#invoke:Chronology|main|{{delink|{{{artist|}}}}}|albums|{{delink|{{{name|{{PAGENAME}}}}}}}}}</includeonly> | ||
| | |||
| below = {{{misc|}}} | | below = {{{misc|}}} | ||
}}{{#ifeq:{{{type|}}}||[[Category:Pages using infobox album with empty type parameter]]}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox album with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox album]] with unknown parameter "_VALUE_"|ignoreblank=y|italic_title |type |name |image |cover |border |alt |caption |longtype |artist |released|released_cargo |released_ref |recorded |recorded_ref |venue |studio |genre |length |language |label |director |producer |format |year|misc|discogs|musicbrainz}}{{#if:{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|1={{{italic_title|}}}{{{italic title|}}}{{{type|}}}{{{name|}}}{{{image|}}}{{{cover|}}}{{{border|}}}{{{alt|}}}{{{caption|}}}{{{longtype|}}}{{{artist|}}}{{{released|}}}{{{recorded|}}}{{{venue|}}}{{{studio|}}}{{{genre|}}}{{{length|}}}{{{language|}}}{{{label|}}}{{{director|}}}{{{producer|}}}{{{format|}}}{{{year|}}}x|2=</?t[drh][ >]|nomatch=}}|{{main other|[[Category:Music infoboxes with malformed table placement|A]]}}}}{{main other|{{#if:{{{length|}}}|{{#if:{{#invoke:String|match|error_category=Music infoboxes with Module:String errors{{!}}A|1={{#invoke:hms|main|duration={{{length|}}}}}|2=class="duration"|plain=true|nomatch=}}|[[Category:Articles with hAudio microformats]]}}}}}}<noinclude> | |||
{{Documentation}} | {{Documentation}} | ||
<!-- Add categories to the /doc subpage, not here. --> | <!-- Add categories to the /doc subpage, not here. --><templatedata> | ||
{ | |||
"params": { | |||
"italic_title": {}, | |||
"type": { | |||
"label": "Type", | |||
"description": "Comma-separated list containing any of: ep, studio, demo, live, compilation, box set, video, tribute, bootleg, promotional", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"name": { | |||
"label": "Name", | |||
"description": "Title of the album. This must be exactly the same as the title of the article for the album.", | |||
"type": "string", | |||
"required": true | |||
}, | |||
"alt": {}, | |||
"caption": { | |||
"description": "Caption shown under the image" | |||
}, | |||
"artist": { | |||
"label": "Artist", | |||
"description": "Artist who made the album", | |||
"example": "The Smashing Pumpkins", | |||
"type": "string", | |||
"required": true | |||
}, | |||
"released": { | |||
"label": "Released", | |||
"description": "The date when the album was released", | |||
"example": "November 15, 2019", | |||
"type": "date", | |||
"suggested": true | |||
}, | |||
"recorded": { | |||
"label": "Recorded", | |||
"description": "Date(s) when the album was recorded", | |||
"example": "December 1990 – March 1991", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"venue": {}, | |||
"studio": { | |||
"label": "Studio", | |||
"description": "Studio(s) where the album was recorded. Known studios are automatically linked", | |||
"example": "Chicago Recording Company", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"genre": {}, | |||
"length": { | |||
"label": "Length", | |||
"description": "Total duration of the album", | |||
"example": "45:15", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"label": { | |||
"label": "Record label", | |||
"description": "Record label(s) that released the album", | |||
"example": "Caroline, Hut", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"director": {}, | |||
"producer": { | |||
"label": "Producer(s)", | |||
"description": "Producers of the album. Names are automatically linked", | |||
"example": "Butch Vig, Billy Corgan", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"format": { | |||
"label": "Format", | |||
"description": "Medium that the album was released on", | |||
"example": "Cassette, CD", | |||
"type": "string" | |||
}, | |||
"year": {}, | |||
"misc": {} | |||
}, | |||
"description": "Adds an infobox for an album. Some things like the chronology are automatically generated.", | |||
"format": "{{_\n| _ = _\n}}\n" | |||
} | |||
</templatedata> | |||
</noinclude> | </noinclude> |
Latest revision as of 03:34, 8 December 2023
This template defines the table "albums". View table.
![](https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/50px-Test_Template_Info-Icon_-_Version_%282%29.svg.png)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |
Adds an infobox for an album. Some things like the chronology are automatically generated.
Parameter | Description | Type | Status | |
---|---|---|---|---|
italic_title | italic_title | no description | Unknown | optional |
Type | type | Comma-separated list containing any of: ep, studio, demo, live, compilation, box set, video, tribute, bootleg, promotional | String | suggested |
Name | name | Title of the album. This must be exactly the same as the title of the article for the album. | String | required |
alt | alt | no description | Unknown | optional |
caption | caption | Caption shown under the image | Unknown | optional |
Artist | artist | Artist who made the album
| String | required |
Released | released | The date when the album was released
| Date | suggested |
Recorded | recorded | Date(s) when the album was recorded
| String | suggested |
venue | venue | no description | Unknown | optional |
Studio | studio | Studio(s) where the album was recorded. Known studios are automatically linked
| String | suggested |
genre | genre | no description | Unknown | optional |
Length | length | Total duration of the album
| String | suggested |
Record label | label | Record label(s) that released the album
| String | suggested |
director | director | no description | Unknown | optional |
Producer(s) | producer | Producers of the album. Names are automatically linked
| String | suggested |
Format | format | Medium that the album was released on
| String | optional |
year | year | no description | Unknown | optional |
misc | misc | no description | Unknown | optional |