Difference between revisions of "Template:AllMusic/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>DixonDBot
m (Migrating 18 interwiki links, now provided by Wikidata on d:Q5832369)
m (78 revisions imported)
 
(18 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{documentation subpage}}
+
{{Documentation subpage}}
__NOTOC__
+
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
=== Purpose ===
+
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.
+
{{High-use| 80,000 }}
 +
{{Uses Wikidata|P1728|P1729|P1730|P1994}}
 +
{{Tracks Wikidata|P1728|P1729|P1730|P1994}}
 +
{{Lua|Module:EditAtWikidata}}
 +
 
 +
== Usage ==
 +
 
 +
=== 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>
  
=== Usage ===
 
;Vertical layout:
 
 
<pre>
 
<pre>
{{Allmusic
+
{{AllMusic
| class      =
+
| class      =  
| id        =
+
| id        =  
| tab        =
+
| tab        =  
| label     =
+
| title     =  
 
| first      =  
 
| first      =  
 
| last      =  
 
| last      =  
| accessdate =
+
| author    =
 +
| accessdate =  
 
}}
 
}}
 
</pre>
 
</pre>
  
;Horizontal layout:
+
=== Using Wikidata ===
<pre>{{Allmusic |class= |id= |tab= |label= |first= |last= |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) ===
  
;Short layout:
+
Full ID:
Valid with these three parameters only:
+
* Usage: <code><nowiki>{{AllMusic | id= dust-in-the-wind-mt0013834783 | title= "Dust in the Wind"}}</nowiki></code>
<pre>{{Allmusic |<class> |<id> |<label>}}</pre>
+
* Output: {{AllMusic | id= dust-in-the-wind-mt0013834783 | title= "Dust in the Wind"}}
 +
* URL:    {{AllMusic | id= dust-in-the-wind-mt0013834783 | pure_url= yes}}
  
=== Parameters ===
+
Short ID:
{| border="1" class="wikitable sortable"
+
* Usage: <code><nowiki>{{AllMusic | id= mt0013834783 | title= "Dust in the Wind"}}</nowiki></code>
|- style="background-color:#f2f2f4"
+
* Output: {{AllMusic | id= mt0013834783 | title= "Dust in the Wind"}}
! Parameter
+
* URL:   {{AllMusic | id= mt0013834783 | pure_url= yes}}
! class="unsortable" style="width:100px" | Type
 
! class="unsortable"|Description
 
|-
 
| '''class'''
 
| optional
 
| Class of information, possible are "artist", "album", "song", "work" or "explore". Value for this parameter corresponds to part of [[Uniform resource locator|URL]] following "www.allmusic.com/". If omitted, it defaults to "artist".
 
|-
 
| '''id'''
 
| '''mandatory'''
 
| Identification of information. Corresponds to part of URL following "artist/", "album/", "song/", "work/" or "explore/". The text before the actual id with name of artist, album etc. can be omitted. (Example: For [http://www.allmusic.com/artist/led-zeppelin-p4739 www.allmusic.com/artist/led-zeppelin-p4739] "p4739" is sufficient for id).
 
|-
 
| '''tab'''
 
| optional
 
| If the link should access directly a specific tab on the AllMusic site you can use this parameter to specify that tab (e.g. "charts-awards"). The value for this parameter corresponds to the suffix of the URL following the identification, after the slash ('/'). If you are specifying a sub-tab of a tab, the whole suffix has to be used, (e.g. "songs/songs-composed-by"). Alternatively you can append the whole suffix for tab to the id parameter not using the tab parameter (see example below).
 
|-
 
| '''label'''
 
| optional
 
| Label to display for the link. If omitted, it defaults to the name of the article where this template is used.
 
|-
 
| '''first'''
 
| optional
 
| The author's first or given name(s).
 
|-
 
| '''last'''
 
| optional
 
| The author's surname or last name.
 
|-
 
| '''pure_url'''
 
| optional
 
| Value of "yes" produces no label and no additional text but a "pure" standalone external link. This option is mainly intended for the automated migration of standalone weblinks but can be used when linking to allmusic using {{tl|Cite web}}, embedding {{tl|Allmusic}} in {{tl|Cite web}}. E.g.<br />
 
<code><nowiki>{{cite web|url={{Allmusic |pure_url=yes |class=album |id=r1796665 |tab=review}} |title=<nowiki>Stone Temple Pilots [Deluxe Edition]</nowiki></nowiki> |first=Stephen Thomas |last=Erlewine}}</code><br />
 
produces:<br />
 
*{{cite web|url={{Allmusic |pure_url=yes |class=album |id=r1796665 |tab=review}} |title=<nowiki>Stone Temple Pilots [Deluxe Edition]</nowiki> |first=Stephen Thomas |last=Erlewine}}
 
|-
 
| '''accessdate'''
 
| optional
 
| Full date when item was accessed. Should not be wikilinked.
 
|-
 
|}
 
  
=== Examples ===
+
=== Composition (class not specified, defaults to composition) ===
; Group or artist
 
*<nowiki>{{</nowiki>Allmusic|id=p4739|label=Led Zeppelin<nowiki>}}</nowiki>
 
  
expands to&nbsp;
+
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 }}
  
*{{Allmusic/sandbox|id=p4739|label=Led Zeppelin}}  
+
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 }}
  
; Album (supplying accessdate)
+
=== Using tab parameter ===
*<nowiki>{{</nowiki>Allmusic|class=album|id=r15973|label=<nowiki>''</nowiki>News of the World<nowiki>''</nowiki>|accessdate=February 10, 2010<nowiki>}}</nowiki>
 
  
expands to&nbsp;
+
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}}
  
*{{Allmusic/sandbox|class=album|id=r15973|label=''News of the World''|accessdate=February 10, 2010}}
+
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}}
  
;Song (short notation)
+
=== Using tab name with id parameter ===
  
*<nowiki>{{</nowiki>Allmusic|song|t2454936|"Dust in the Wind"<nowiki>}}</nowiki>
+
Full ID:
 +
* Usage:  <code><nowiki>{{AllMusic | id= led-zeppelin-mn0000139026/discography | title= Led Zeppelin discography}}</nowiki></code>
 +
* Output: {{AllMusic | id= led-zeppelin-mn0000139026/discography | title= Led Zeppelin discography}}
 +
* URL:    {{AllMusic | id= led-zeppelin-mn0000139026/discography | pure_url= yes}}
  
expands to&nbsp;
+
Short ID:
 +
* Usage:  <code><nowiki>{{AllMusic | id= mn0000139026/discography | title= Discography of Led Zeppelin}}</nowiki></code>
 +
* Output: {{AllMusic | id= mn0000139026/discography | title= Discography of Led Zeppelin}}
 +
* URL:    {{AllMusic | id= mn0000139026/discography | pure_url= yes}}
  
*{{Allmusic/sandbox|song|t2454936|"Dust in the Wind"}}
+
=== Author name, access date ===
  
; Using tab parameter
+
Full ID:
*<nowiki>{{</nowiki>Allmusic|id=p4739|tab=discography|label=Discography of Led Zeppelin<nowiki>}}</nowiki>
+
* 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}}
  
expands to&nbsp;
+
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}}
  
*{{Allmusic/sandbox|id=p4739|tab=discography|label=Discography of Led Zeppelin}}
+
=== Using ''pure_url'' with a citation template ===
  
; Accessing tab in tab with sort (not using tab parameter)
+
* 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>
*<nowiki>{{</nowiki>Allmusic|id=p4739/discography/compilations/title-asc|label=Compilations of Led Zeppelin sorted by title<nowiki>}}</nowiki>
+
* 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}}
  
expands to&nbsp;
+
=== No ID in template or Wikidata and not using ''pure_url'' ===
  
*{{Allmusic/sandbox|id=p4739/discography/compilations/title-asc|label=Compilations of Led Zeppelin sorted by title}}
+
* Usage: {{tlcw|{{BASEPAGENAME}} }}
 +
* Output: {{{{BASEPAGENAME}} }}
  
; Author name
+
== TemplateData ==
*<nowiki>{{</nowiki>Allmusic|class=album|id=r11465|label=Physical Graffiti|first=Stephen Thomas|last=Erlewine|accessdate=February 10, 2010<nowiki>}}</nowiki>
+
{{TemplateData header}}
 +
<templatedata>
 +
{
 +
    "description": "This template produces an external link to an entry at AllMusic.",
 +
    "params": {
 +
        "class": {
 +
            "label": "AllMusic class",
 +
            "aliases": ["1"],
 +
            "type": "string",
 +
            "default": "artist",
 +
            "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": {
 +
            "label": "AllMusic ID",
 +
            "aliases": ["2"],
 +
            "type": "string",
 +
            "required": true,
 +
            "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": {
 +
            "label": "AllMusic tab",
 +
            "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\")."
 +
        },
 +
        "first": {
 +
            "label": "Author's first name",
 +
            "type": "string",
 +
            "description": "The author's first or given name(s)."
 +
        },
 +
        "last": {
 +
            "label": "Author's last name",
 +
            "type": "string",
 +
            "description": "The author's surname or last name."
 +
        },
 +
        "author": {
 +
            "label": "Author's full name",
 +
            "type": "string",
 +
            "description": "The author's full name. Do not use when |last= is used."
 +
        },
 +
        "accessdate": {
 +
            "label": "Access date",
 +
            "type": "string",
 +
            "description": "Full date when item was accessed. Should not be wiki-linked."
 +
        },
 +
        "pure_url": {
 +
            "label": "URL only",
 +
            "type": "string",
 +
            "description": "If set to \"yes\", produces URL only without additional formatting. Typically used in citation templates."
 +
        }
 +
    }
 +
}
 +
</templatedata>
  
expands to&nbsp;
+
== Tracking category ==
 +
* {{clc|AllMusic template missing ID and not in Wikidata}}
  
*{{Allmusic/sandbox|class=album|id=r11465|label=Physical Graffiti|first=Stephen Thomas|last=Erlewine|accessdate=February 10, 2010}}
+
== See also ==
 +
* {{tl|AllMovie title}}
 +
* {{tl|AllMovie name}}
 +
* {{tl|AllGame}}
  
<includeonly>
+
<includeonly>{{Sandbox other||
<!-- ADD CATEGORIES BELOW THIS LINE -->
+
<!-- Categories go here and interwikis go in Wikidata. -->
 
[[Category:Music external link templates]]
 
[[Category:Music external link templates]]
 
[[Category:Music source templates]]
 
[[Category:Music source templates]]
 
[[Category:WikiProject Albums templates]]
 
[[Category:WikiProject Albums templates]]
 
+
[[Category:People and person external link templates]]
<!-- ADD INTERWIKIS BELOW THIS LINE -->
+
[[Category:External link templates using Wikidata]]
</includeonly>
+
[[Category:Templates using multiple Wikidata external identifiers]]
 
+
[[Category:Templates that add a tracking category]]
<includeonly>
+
}}</includeonly>
[[sd:سانچو:Amg]]
 
</includeonly>
 

Latest revision as of 11:19, 20 October 2020

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:

Using tab name with id 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