Difference between revisions of "Template:AllMusic/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Zyxw
(add example for composition)
blackwiki>Zyxw
(updates for use of Wikidata)
Line 2: Line 2:
 
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
 
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
 
This template provides a convenient way to produce an external link to an entry at [[AllMusic]]. The template can be used for any link to AllMusic's website, including the "External links" section or when citing it as a source.
 
This template provides a convenient way to produce an external link to an entry at [[AllMusic]]. The template can be used for any link to AllMusic's website, including the "External links" section or when citing it as a source.
{{Wikidata property|P1728|P1729|P1730|P1994}}
+
{{Uses Wikidata|P1728|P1729|P1730|P1994}}
 +
{{Tracks Wikidata|P1728|P1729|P1730|P1994}}
 +
{{Lua|Module:EditAtWikidata}}
  
 
== Usage ==
 
== Usage ==
=== Vertical layout ===
+
 
 +
=== Unnamed parameters ===
 +
Valid with these three parameters only:
 +
<pre>{{AllMusic|<class>|<id>|<title>}}</pre>
 +
 
 +
=== Named parameters ===
 +
<pre>{{AllMusic |class= |id= |tab= |title= |last= |first= |author= |accessdate= }}</pre>
 +
 
 
<pre>
 
<pre>
 
{{AllMusic
 
{{AllMusic
Line 11: Line 20:
 
| id        =  
 
| id        =  
 
| tab        =  
 
| tab        =  
| label     =  
+
| title     =  
 
| first      =  
 
| first      =  
 
| last      =  
 
| last      =  
Line 19: Line 28:
 
</pre>
 
</pre>
  
=== Horizontal layout (named parameters) ===
+
=== Using Wikidata ===
<pre>{{AllMusic |class= |id= |tab= |label= |last= |first= |author= |accessdate= }}</pre>
+
{{tlcw|{{BASEPAGENAME}} }}
 +
 
 +
{{tlcw|{{BASEPAGENAME}} | title{{=}} <var>Text displayed in link</var> }}
 +
 
 +
== Examples ==
 +
 
 +
=== Artist or group (class not specified, defaults to artist) ===
 +
 
 +
Full ID:
 +
* Usage:  <code><nowiki>{{AllMusic | id= led-zeppelin-mn0000139026 | title= Led Zeppelin}}</nowiki></code>
 +
* Output: {{AllMusic | id= led-zeppelin-mn0000139026 | title= Led Zeppelin}}
 +
* URL:    {{AllMusic | id= led-zeppelin-mn0000139026 | pure_url= yes}}
 +
 
 +
Short ID:
 +
* Usage:  <code><nowiki>{{AllMusic | id= mn0000139026 | title= Led Zeppelin}}</nowiki></code>
 +
* Output: {{AllMusic | id= mn0000139026 | title= Led Zeppelin}}
 +
* URL:    {{AllMusic | id= mn0000139026 | pure_url= yes}}
 +
 
 +
=== Album (class not specified, defaults to album) ===
 +
 
 +
Full ID:
 +
* Usage:  <code><nowiki>{{AllMusic | id= news-of-the-world-mw0000191493 | title= ''News of the World'' | accessdate= March 30, 2014}}</nowiki></code>
 +
* Output: {{AllMusic | id= news-of-the-world-mw0000191493 | title= ''News of the World'' | accessdate= March 30, 2014}}
 +
* URL:    {{AllMusic | id= news-of-the-world-mw0000191493 | pure_url= yes}}
 +
 
 +
Short ID:
 +
* Usage:  <code><nowiki>{{AllMusic | id= mw0000191493 | title= ''News of the World'' | accessdate= March 30, 2014}}</nowiki></code>
 +
* Output: {{AllMusic | id= mw0000191493 | title= ''News of the World'' | accessdate= March 30, 2014}}
 +
* URL:    {{AllMusic | id= mw0000191493 | pure_url= yes}}
 +
 
 +
=== Song (class not specified, defaults to song) ===
 +
 
 +
Full ID:
 +
* Usage:  <code><nowiki>{{AllMusic | id= dust-in-the-wind-mt0013834783 | title= "Dust in the Wind"}}</nowiki></code>
 +
* Output: {{AllMusic | id= dust-in-the-wind-mt0013834783 | title= "Dust in the Wind"}}
 +
* URL:    {{AllMusic | id= dust-in-the-wind-mt0013834783 | pure_url= yes}}
 +
 
 +
Short ID:
 +
* Usage:  <code><nowiki>{{AllMusic | id= mt0013834783 | title= "Dust in the Wind"}}</nowiki></code>
 +
* Output: {{AllMusic | id= mt0013834783 | title= "Dust in the Wind"}}
 +
* URL:    {{AllMusic | id= mt0013834783 | pure_url= yes}}
  
=== Horizontal layout (unnamed parameters) ===
+
=== Composition (class not specified, defaults to composition) ===
Valid with these three parameters only:
+
 
<pre>{{AllMusic|<class>|<id>|<label>}}</pre>
+
Full ID:
 +
* Usage:  <code><nowiki>{{AllMusic | id= clarinet-concerto-mc0002356981 | title= Clarinet Concerto (Copland) }}</nowiki></code>
 +
* Output: {{AllMusic | id= clarinet-concerto-mc0002356981 | title= Clarinet Concerto (Copland) }}
 +
* URL:    {{AllMusic | id= clarinet-concerto-mc0002356981 | pure_url= yes }}
 +
 
 +
Short ID:
 +
* Usage:  <code><nowiki>{{AllMusic | id= mc0002356981 | title= Clarinet Concerto (Copland) }}</nowiki></code>
 +
* Output: {{AllMusic | id= mc0002356981 | title= Clarinet Concerto (Copland) }}
 +
* URL:    {{AllMusic | id= mc0002356981 | pure_url= yes }}
 +
 
 +
=== Using tab parameter ===
 +
 
 +
Full ID:
 +
* Usage:  <code><nowiki>{{AllMusic | id= led-zeppelin-mn0000139026 | tab= discography | title= Led Zeppelin discography}}</nowiki></code>
 +
* Output: {{AllMusic | id= led-zeppelin-mn0000139026 | tab= discography | title= Led Zeppelin discography}}
 +
* URL:    {{AllMusic | id= led-zeppelin-mn0000139026 | tab= discography | pure_url= yes}}
 +
 
 +
Short ID:
 +
* Usage:  <code><nowiki>{{AllMusic | id= mn0000139026 | tab= discography | title= Discography of Led Zeppelin}}</nowiki></code>
 +
* Output: {{AllMusic | id= mn0000139026 | tab= discography | title= Discography of Led Zeppelin}}
 +
* URL:    {{AllMusic | id= mn0000139026 | tab= discography | pure_url= yes}}
 +
 
 +
=== Author name, access date ===
 +
 
 +
Full ID:
 +
* Usage:  <code><nowiki>{{AllMusic | class= album | id= physical-graffiti-mw0000190771 | title= Review of ''Physical Graffiti'' | first= Stephen Thomas | last= Erlewine | accessdate= March 30, 2014}}</nowiki></code>
 +
* Output: {{AllMusic | class= album | id= physical-graffiti-mw0000190771 | title= Review of ''Physical Graffiti'' | first= Stephen Thomas | last= Erlewine | accessdate= March 30, 2014}}
 +
* URL:    {{AllMusic | class= album | id= physical-graffiti-mw0000190771 | pure_url= yes}}
 +
 
 +
Short ID:
 +
* Usage:  <code><nowiki>{{AllMusic | class= album | id= mw0000190771 | title= Review of ''Physical Graffiti'' | first= Stephen Thomas | last= Erlewine | accessdate= March 30, 2014}}</nowiki></code>
 +
* Output: {{AllMusic | class= album | id= mw0000190771 | title= Review of ''Physical Graffiti'' | first= Stephen Thomas | last= Erlewine | accessdate= March 30, 2014}}
 +
* URL:    {{AllMusic | class= album | id= mw0000190771 | pure_url= yes}}
 +
 
 +
=== Using ''pure_url'' with a citation template ===
 +
 
 +
* Usage: <code><nowiki>{{cite web | url = {{AllMusic|album|mw0000190771|pure_url=yes}} | title = Review of ''Physical Graffiti'' | work = [[AllMusic]] | publisher = [[All Media Network]] | first = Stephen Thomas | last = Erlewine | accessdate = March 30, 2014}}</nowiki></code>
 +
* Output: {{cite web | url = {{AllMusic|album|mw0000190771|pure_url=yes}} | title = Review of ''Physical Graffiti'' | work = [[AllMusic]] | publisher = [[All Media Network]] | first = Stephen Thomas | last = Erlewine | accessdate = March 30, 2014}}
 +
* URL:    {{AllMusic|album|mw0000190771|pure_url=yes}}
 +
 
 +
=== No ID in template or Wikidata and not using ''pure_url'' ===
 +
 
 +
* Usage: {{tlcw|{{BASEPAGENAME}} }}
 +
* Output: {{{{BASEPAGENAME}} }}
  
== Template data ==
+
== TemplateData ==
{{TemplateDataHeader}}
+
{{TemplateData header}}
 
<templatedata>
 
<templatedata>
 
{
 
{
Line 37: Line 129:
 
             "type": "string",
 
             "type": "string",
 
             "default": "artist",
 
             "default": "artist",
             "description": "Class of information. Value for this parameter corresponds to part of URL following \"www.allmusic.com/\". Examples (without quotes): \"artist\" (default), \"album\", \"song\", \"composition\", \"work\" or \"explore\"."
+
             "description": "Class of information. Value for this parameter corresponds to part of URL following www.allmusic.com/. Examples: artist, album, song, composition. If omitted, the default is based on the \"id\", where mn=artist, mw=album, mt=song, and mc=composition."
 
         },
 
         },
 
         "id": {
 
         "id": {
Line 44: Line 136:
 
             "type": "string",
 
             "type": "string",
 
             "required": true,
 
             "required": true,
             "description": "AllMusic identification number or string. Corresponds to part of URL following \"artist/\", \"album/\", \"song/\", \"composition/\", \"work/\" or \"explore/\". Can omit the text before the actual ID with name of artist, album, etc. Example: The ID for www.allmusic.com/artist/led-zeppelin-mn0000139026 would be either \"led-zeppelin-mn0000139026\" or \"mn0000139026\". Can also use the entire end of URL, such as: \"release/stone-temple-pilots-deluxe-edition-mr0002917004\"."
+
             "description": "AllMusic identification number or string. Corresponds to part of URL following artist/, album/, song/, or composition/. Can omit the text before the actual ID with name of artist, album, etc. Example: The ID for www.allmusic.com/artist/led-zeppelin-mn0000139026 would be either \"led-zeppelin-mn0000139026\" or \"mn0000139026\". Can also use the entire end of URL, such as: \"release/stone-temple-pilots-deluxe-edition-mr0002917004\"."
 +
        },
 +
        "title": {
 +
            "label": "Displayed text",
 +
            "aliases": ["label", "3"],
 +
            "type": "string",
 +
            "description": "Text to display for the link. If omitted, it defaults to the name of the article where this template is used."
 
         },
 
         },
 
         "tab": {
 
         "tab": {
Line 50: Line 148:
 
             "type": "string",
 
             "type": "string",
 
             "description": "If the link should access directly a specific tab on the AllMusic site you can use this parameter to specify that tab. The value for this parameter corresponds to the suffix of the URL following the identification, after the slash ('/'). Examples (without quotes): \"biography\", \"discography\", \"songs\", \"awards\", etc. If you are specifying a sub-tab of a tab, the whole suffix has to be used, (e.g. \"songs/all\")."
 
             "description": "If the link should access directly a specific tab on the AllMusic site you can use this parameter to specify that tab. The value for this parameter corresponds to the suffix of the URL following the identification, after the slash ('/'). Examples (without quotes): \"biography\", \"discography\", \"songs\", \"awards\", etc. If you are specifying a sub-tab of a tab, the whole suffix has to be used, (e.g. \"songs/all\")."
        },
 
        "label": {
 
            "label": "Displayed text",
 
            "aliases": ["title", "3"],
 
            "type": "string",
 
            "description": "Text to display for the link. If omitted, it defaults to the name of the article where this template is used."
 
 
         },
 
         },
 
         "first": {
 
         "first": {
Line 86: Line 178:
 
</templatedata>
 
</templatedata>
  
== Examples ==
+
== Tracking category ==
=== Artist or group (class not specified, defaults to artist) ===
+
* {{clc|AllMusic template missing ID and not in Wikidata}}
 
 
Full ID:
 
* Code:  <code><nowiki>{{AllMusic | id= led-zeppelin-mn0000139026 | label= Led Zeppelin}}</nowiki></code>
 
* Output: {{AllMusic | id= led-zeppelin-mn0000139026 | label= Led Zeppelin}}
 
* URL:    {{AllMusic | id= led-zeppelin-mn0000139026 | pure_url= yes}}
 
 
 
Short ID:
 
* Code:  <code><nowiki>{{AllMusic | id= mn0000139026 | label= Led Zeppelin}}</nowiki></code>
 
* Output: {{AllMusic | id= mn0000139026 | label= Led Zeppelin}}
 
* URL:    {{AllMusic | id= mn0000139026 | pure_url= yes}}
 
 
 
=== Album (with accessdate) ===
 
 
 
Full ID:
 
* Code:  <code><nowiki>{{AllMusic | class= album | id= news-of-the-world-mw0000191493 | label= ''News of the World'' | accessdate= March 30, 2014}}</nowiki></code>
 
* Output: {{AllMusic | class= album | id= news-of-the-world-mw0000191493 | label= ''News of the World'' | accessdate= March 30, 2014}}
 
* URL:    {{AllMusic | class= album | id= news-of-the-world-mw0000191493 | pure_url= yes}}
 
 
 
Short ID:
 
* Code:  <code><nowiki>{{AllMusic | class= album | id= mw0000191493 | label= ''News of the World'' | accessdate= March 30, 2014}}</nowiki></code>
 
* Output: {{AllMusic | class= album | id= mw0000191493 | label= ''News of the World'' | accessdate= March 30, 2014}}
 
* URL:    {{AllMusic | class= album | id= mw0000191493 | pure_url= yes}}
 
 
 
=== Song (with unnamed parameters) ===
 
 
 
Full ID:
 
* Code:  <code><nowiki>{{AllMusic | song | dust-in-the-wind-mt0013834783 | "Dust in the Wind"}}</nowiki></code>
 
* Output: {{AllMusic | song | dust-in-the-wind-mt0013834783 | "Dust in the Wind"}}
 
* URL:    {{AllMusic | song | dust-in-the-wind-mt0013834783 | pure_url= yes}}
 
 
 
Short ID:
 
* Code:  <code><nowiki>{{AllMusic | song | mt0013834783 | "Dust in the Wind"}}</nowiki></code>
 
* Output: {{AllMusic | song | mt0013834783 | "Dust in the Wind"}}
 
* URL:    {{AllMusic | song | mt0013834783 | pure_url= yes}}
 
 
 
=== Composition (with unnamed parameters) ===
 
 
 
Full ID:
 
* Code:  <code><nowiki>{{AllMusic | composition | clarinet-concerto-mc0002356981 | Clarinet Concerto (Copland) }}</nowiki></code>
 
* Output: {{AllMusic | composition | clarinet-concerto-mc0002356981 | Clarinet Concerto (Copland) }}
 
* URL:    {{AllMusic | composition | clarinet-concerto-mc0002356981 | pure_url= yes }}
 
 
 
Short ID:
 
* Code:  <code><nowiki>{{AllMusic | composition | mc0002356981 | Clarinet Concerto (Copland) }}</nowiki></code>
 
* Output: {{AllMusic | composition | mc0002356981 | Clarinet Concerto (Copland) }}
 
* URL:    {{AllMusic | composition | mc0002356981 | pure_url= yes }}
 
 
 
=== Using tab parameter ===
 
 
 
Full ID:
 
* Code:  <code><nowiki>{{AllMusic | id= led-zeppelin-mn0000139026 | tab= discography | label= Led Zeppelin discography}}</nowiki></code>
 
* Output: {{AllMusic | id= led-zeppelin-mn0000139026 | tab= discography | label= Led Zeppelin discography}}
 
* URL:    {{AllMusic | id= led-zeppelin-mn0000139026 | tab= discography | pure_url= yes}}
 
 
 
Short ID:
 
* Code:  <code><nowiki>{{AllMusic | id= mn0000139026 | tab= discography | label= Discography of Led Zeppelin}}</nowiki></code>
 
* Output: {{AllMusic | id= mn0000139026 | tab= discography | label= Discography of Led Zeppelin}}
 
* URL:    {{AllMusic | id= mn0000139026 | tab= discography | pure_url= yes}}
 
 
 
=== Author name, access date ===
 
 
 
Full ID:
 
* Code:  <code><nowiki>{{AllMusic | class= album | id= physical-graffiti-mw0000190771 | title= Review of ''Physical Graffiti'' | first= Stephen Thomas | last= Erlewine | accessdate= March 30, 2014}}</nowiki></code>
 
* Output: {{AllMusic | class= album | id= physical-graffiti-mw0000190771 | title= Review of ''Physical Graffiti'' | first= Stephen Thomas | last= Erlewine | accessdate= March 30, 2014}}
 
* URL:    {{AllMusic | class= album | id= physical-graffiti-mw0000190771 | pure_url= yes}}
 
 
 
Short ID:
 
* Code:  <code><nowiki>{{AllMusic | class= album | id= mw0000190771 | title= Review of ''Physical Graffiti'' | first= Stephen Thomas | last= Erlewine | accessdate= March 30, 2014}}</nowiki></code>
 
* Output: {{AllMusic | class= album | id= mw0000190771 | title= Review of ''Physical Graffiti'' | first= Stephen Thomas | last= Erlewine | accessdate= March 30, 2014}}
 
* URL:    {{AllMusic | class= album | id= mw0000190771 | pure_url= yes}}
 
 
 
=== Using ''pure_url'' with a citation template ===
 
 
 
* Code:  <code><nowiki>{{cite web | url = {{AllMusic|album|mw0000190771|pure_url=yes}} | title = Review of ''Physical Graffiti'' | work = [[AllMusic]] | publisher = [[All Media Network]] | first = Stephen Thomas | last = Erlewine | accessdate = March 30, 2014}}</nowiki></code><br />
 
* Output: {{cite web | url = {{AllMusic|album|mw0000190771|pure_url=yes}} | title = Review of ''Physical Graffiti'' | work = [[AllMusic]] | publisher = [[All Media Network]] | first = Stephen Thomas | last = Erlewine | accessdate = March 30, 2014}}
 
* URL:    {{AllMusic|album|mw0000190771|pure_url=yes}}
 
  
 
== See also ==
 
== See also ==
Line 175: Line 191:
 
[[Category:Music source templates]]
 
[[Category:Music source templates]]
 
[[Category:WikiProject Albums templates]]
 
[[Category:WikiProject Albums templates]]
 +
[[Category:People and person external link templates]]
 +
[[Category:External link templates using Wikidata]]
 +
[[Category:Templates that add a tracking category]]
 
}}</includeonly>
 
}}</includeonly>

Revision as of 16:05, 13 August 2018

This template provides a convenient way to produce an external link to an entry at AllMusic. The template can be used for any link to AllMusic's website, including the "External links" section or when citing it as a source. Template:Uses Wikidata Template:Tracks Wikidata

Usage

Unnamed parameters

Valid with these three parameters only:

{{AllMusic|<class>|<id>|<title>}}

Named parameters

{{AllMusic |class= |id= |tab= |title= |last= |first= |author= |accessdate= }}
{{AllMusic
| class      = 
| id         = 
| tab        = 
| title      = 
| first      = 
| last       = 
| author     =
| accessdate = 
}}

Using Wikidata

Template:Tlcw

Template:Tlcw

Examples

Artist or group (class not specified, defaults to artist)

Full ID:

Short ID:

Album (class not specified, defaults to album)

Full ID:

Short ID:

Song (class not specified, defaults to song)

Full ID:

Short ID:

Composition (class not specified, defaults to composition)

Full ID:

Short ID:

Using tab parameter

Full ID:

Short ID:

Author name, access date

Full ID:

Short ID:

Using pure_url with a citation template

  • Usage: {{cite web | url = {{AllMusic|album|mw0000190771|pure_url=yes}} | title = Review of ''Physical Graffiti'' | work = [[AllMusic]] | publisher = [[All Media Network]] | first = Stephen Thomas | last = Erlewine | accessdate = March 30, 2014}}
  • Output: Erlewine, Stephen Thomas. "Review of Physical Graffiti". AllMusic. All Media Network. Retrieved March 30, 2014.
  • URL: https://www.allmusic.com/album/mw0000190771

No ID in template or Wikidata and not using pure_url

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for AllMusic

This template produces an external link to an entry at AllMusic.

Template parameters

ParameterDescriptionTypeStatus
AllMusic classclass 1

Class of information. Value for this parameter corresponds to part of URL following www.allmusic.com/. Examples: artist, album, song, composition. If omitted, the default is based on the "id", where mn=artist, mw=album, mt=song, and mc=composition.

Default
artist
Stringoptional
AllMusic IDid 2

AllMusic identification number or string. Corresponds to part of URL following artist/, album/, song/, or composition/. Can omit the text before the actual ID with name of artist, album, etc. Example: The ID for www.allmusic.com/artist/led-zeppelin-mn0000139026 would be either "led-zeppelin-mn0000139026" or "mn0000139026". Can also use the entire end of URL, such as: "release/stone-temple-pilots-deluxe-edition-mr0002917004".

Stringrequired
Displayed texttitle label 3

Text to display for the link. If omitted, it defaults to the name of the article where this template is used.

Stringoptional
AllMusic tabtab

If the link should access directly a specific tab on the AllMusic site you can use this parameter to specify that tab. The value for this parameter corresponds to the suffix of the URL following the identification, after the slash ('/'). Examples (without quotes): "biography", "discography", "songs", "awards", etc. If you are specifying a sub-tab of a tab, the whole suffix has to be used, (e.g. "songs/all").

Stringoptional
Author's first namefirst

The author's first or given name(s).

Stringoptional
Author's last namelast

The author's surname or last name.

Stringoptional
Author's full nameauthor

The author's full name. Do not use when |last= is used.

Stringoptional
Access dateaccessdate

Full date when item was accessed. Should not be wiki-linked.

Stringoptional
URL onlypure_url

If set to "yes", produces URL only without additional formatting. Typically used in citation templates.

Stringoptional

Tracking category

See also