Template:Music infobox: Difference between revisions
From Halopedia, the Halo wiki
mNo edit summary |
m (Text replacement - "}} {{!}}- {{#if:" to "}} |- {{#if:") |
||
Line 1: | Line 1: | ||
{| class="infobox" style="width:260px; color:{{{color|#000}}}; background:{{{BG|#FFCC00}}}" cellspacing="0" | {| class="infobox" style="width:260px; color:{{{color|#000}}}; background:{{{BG|#FFCC00}}}" cellspacing="0" | ||
! class="infoboxheading" colspan="2" style="background:{{{nameBG|transparent}}}; color:{{{color|#000}}}" | {{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}} | ! class="infoboxheading" colspan="2" style="background:{{{nameBG|transparent}}}; color:{{{color|#000}}}" | {{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}} | ||
|- | |||
{{#if:{{{video|}}}| | {{#if:{{{video|}}}| | ||
{{!}} class="infoboxmedia" colspan="2" style="background:{{{imageBG|#f0f0f0}}}" {{!}} {{{video}}} | {{!}} class="infoboxmedia" colspan="2" style="background:{{{imageBG|#f0f0f0}}}" {{!}} {{{video}}} | ||
}} | }} | ||
|- | |||
{{#if:{{{yt|}}}| | {{#if:{{{yt|}}}| | ||
{{!}} class="infoboxmedia" colspan="2" style="background:{{{imageBG|#f0f0f0}}}" {{!}} {{#widget:YouTube|id={{{yt}}}|width=300}} | {{!}} class="infoboxmedia" colspan="2" style="background:{{{imageBG|#f0f0f0}}}" {{!}} {{#widget:YouTube|id={{{yt}}}|width=300}} | ||
}} | }} | ||
|- | |||
{{#if:{{{vimeo|}}}| | {{#if:{{{vimeo|}}}| | ||
{{!}} class="infoboxmedia" colspan="2" style="background:{{{imageBG|#f0f0f0}}}" {{!}} {{#widget:Vimeo|id={{{vimeo}}}|width=300}} | {{!}} class="infoboxmedia" colspan="2" style="background:{{{imageBG|#f0f0f0}}}" {{!}} {{#widget:Vimeo|id={{{vimeo}}}|width=300}} | ||
}} | }} | ||
|- | |||
{{#if:{{{soundtrack|}}}| | {{#if:{{{soundtrack|}}}| | ||
{{!}} class="infoboxlabel" style="background:{{{fieldBG|#F2F3F4}}}; width:100px" {{!}} | {{!}} class="infoboxlabel" style="background:{{{fieldBG|#F2F3F4}}}; width:100px" {{!}} | ||
Line 20: | Line 20: | ||
{{{soundtrack}}} | {{{soundtrack}}} | ||
{{!}}-}} | {{!}}-}} | ||
|- | |||
{{#if:{{{album|}}}| | {{#if:{{{album|}}}| | ||
{{!}} class="infoboxlabel" style="background:{{{fieldBG|#F2F3F4}}}; width:100px" {{!}} | {{!}} class="infoboxlabel" style="background:{{{fieldBG|#F2F3F4}}}; width:100px" {{!}} | ||
Line 51: | Line 51: | ||
{{{next}}} | {{{next}}} | ||
{{!}}-}} | {{!}}-}} | ||
|- | |||
{{#if:{{{spotify|}}}| | {{#if:{{{spotify|}}}| | ||
{{!}} class="infoboxmedia" colspan="2" style="background:{{{imageBG|#f0f0f0}}}" {{!}} {{#widget:Spotify|track={{{spotify}}}|width=300}} | {{!}} class="infoboxmedia" colspan="2" style="background:{{{imageBG|#f0f0f0}}}" {{!}} {{#widget:Spotify|track={{{spotify}}}|width=300}} | ||
}} | }} | ||
|- | |||
{{#if:{{{apple|}}}| | {{#if:{{{apple|}}}| | ||
{{!}} class="infoboxmedia" colspan="2" style="background:{{{imageBG|#f0f0f0}}}" {{!}} {{#widget:AppleMusic|track={{{apple}}}|width=300}} | {{!}} class="infoboxmedia" colspan="2" style="background:{{{imageBG|#f0f0f0}}}" {{!}} {{#widget:AppleMusic|track={{{apple}}}|width=300}} |
Revision as of 09:50, October 18, 2022
Music infobox | |
---|---|
Usage
This template accepts a number of parameters, including in-built functionality for the automatic embedding of YouTube and Vimeo videos and Spotify/Apple music embeds. As such, when embedding YouTube (etc) videos, all you need to add to the relevant parameter is the ID at the end of the given URL. For an example of this in usage, see the Spirit of Fire page. The video parameter is kept around for other use cases, and does not require a specific ID.
Copy the following:
{{Music infobox |video= |yt= |vimeo= |album= |composer= |length= |last= |next= |spotify= |apple= }}