Difference between revisions of "Template:Extra album cover/sandbox"
imported>Zackmann08 (Adding unknown parameter tracking through Category:Pages using extra album cover with unknown parameters using Module:check for unknown parameters) |
imported>JJMC89 (test) |
||
Line 1: | Line 1: | ||
{{Infobox | {{Infobox | ||
| child = <includeonly>yes</includeonly> | | child = <includeonly>yes</includeonly> | ||
− | | headerstyle = background: {{ | + | | headerstyle = background: {{Infobox album/color|{{{type|}}}}} |
− | | header1 = {{#switch:{{{header|}}}|no|none=| | + | | header1 = {{#switch:{{{header|}}}|no|none=|=Alternative cover|#default={{{header|}}}}} |
| data2 = {{Infobox | child = yes | | data2 = {{Infobox | child = yes | ||
− | | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{cover|{{{image|}}}}}}|size={{{cover_size|}}}|sizedefault=frameless|alt={{{alt|}}}|border={{{border|}}}|title={{{caption| | + | | image = {{#invoke:InfoboxImage|InfoboxImage|image={{{cover|{{{image|}}}}}}|size={{{cover_size|}}}|sizedefault=frameless|alt={{{alt|}}}|border={{{border|}}}|title={{{caption|}}}}} |
| caption = {{{caption|}}} | | caption = {{{caption|}}} | ||
}} | }} | ||
− | }}{{#if:{{#invoke:String|match|1={{{header|}}}{{{type|}}}{{{cover|}}}{{{image|}}}{{{cover_size|}}}{{{alt|}}}{{{border|}}}{{{caption|}}}x|2=</?t[drh][ >]|nomatch=}}|[[Category:Music infoboxes with malformed table placement|I]]}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using extra album cover with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Extra album cover]] with unknown parameter "_VALUE_"|ignoreblank=y| alt | border | caption | cover | cover_size | header | image | type | + | }}{{#if:{{#invoke:String|match|1={{{header|}}}{{{type|}}}{{{cover|}}}{{{image|}}}{{{cover_size|}}}{{{alt|}}}{{{border|}}}{{{caption|}}}x|2=</?t[drh][ >]|nomatch=}}|[[Category:Music infoboxes with malformed table placement|I]]}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using extra album cover with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Extra album cover]] with unknown parameter "_VALUE_"|ignoreblank=y| alt | border | caption | cover | cover_size | header | image | type }}<noinclude> |
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 00:21, 18 November 2018
Alternative cover |
---|
![]() | This is the template sandbox page for Template:Extra album cover (diff). See also the companion subpage for test cases. |
![]() | This template uses Lua: |
Usage
Important: When using this template, please ensure you comply with the non-free content criteria. This includes not using multiple non-free images when one would suffice.
Infobox album
For use with {{Infobox album}}; use this template in |misc=
like this:
{{Infobox album ... | misc = {{Extra album cover | header = | type = studio | cover = | border = <!-- optional parameter, type "yes" here to add a 1px border to the cover image --> | alt = | caption = }} }}
Other values for |type=
are at Template:Infobox album/color.
Infobox song
For use with {{Infobox song}}; use this template in |misc=
like this:
{{Infobox song | type = single ... | misc = {{Extra album cover | header = | type = single | cover = | border = <!-- optional parameter, type "yes" here to add a 1px border to the cover image --> | alt = | caption = }} }}
Note: In the event that |type=single
is not used in Infobox song, specify song
in the |type=
for this subtemplate, so that a light blue color will be produced.
Tracking category
TemplateData
TemplateData for Extra album cover
For use with {{Infobox album}} or {{Infobox song}} – adds an extra album cover or image
Parameter | Description | Type | Status | |
---|---|---|---|---|
Header | header | text for top of image
| String | suggested |
Type | type | sets the header color
| String | suggested |
Cover | cover image | the file name for the cover
| File | required |
Cover size | cover_size | specifies the image size | Unknown | optional |
Alt | alt | alternative text for the visually impaired | String | optional |
Border | border | type "yes" to add a 1px border to the image | String | optional |
Caption | caption | adds a caption beneath the image
| String | optional |
The above documentation is transcluded from Template:Extra album cover/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |