Difference between revisions of "Template:AllMusic/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>GreenStork
m (ru interwiki fix)
m (78 revisions imported)
 
(39 intermediate revisions by 26 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        =  
| label     =
+
| tab        =
| accessdate =
+
| title     =
 +
| first      =
 +
| last      =
 +
| author    =
 +
| accessdate =  
 
}}
 
}}
 
</pre>
 
</pre>
  
;Horizontal layout:
+
=== Using Wikidata ===
<pre>{{Allmusic |class= |id= |label= |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}}
  
=== Parameters ===
+
=== Composition (class not specified, defaults to composition) ===
  
{| border="1" class="prettytable sortable"
+
Full ID:
|- style="background-color:#f2f2f4"
+
* Usage: <code><nowiki>{{AllMusic | id= clarinet-concerto-mc0002356981 | title= Clarinet Concerto (Copland) }}</nowiki></code>
! Parameter
+
* Output: {{AllMusic | id= clarinet-concerto-mc0002356981 | title= Clarinet Concerto (Copland) }}
! class="unsortable" style="width:130px" | Type
+
* URL:    {{AllMusic | id= clarinet-concerto-mc0002356981 | pure_url= yes }}
! class="unsortable"|Description
 
|-
 
| '''class'''
 
| optional
 
| Class of information, possible are "artist", "album", "song", "work" or "explore". Value for this parameter corresponds part of [[URL]] "following www.allmusic.com/". Default is "artist".
 
|-
 
| '''id'''
 
| '''mandatory'''
 
| Identification of information. Corresponds to the part of the 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).
 
|-
 
| '''label'''
 
| optional
 
| Label to display the link, which defaults to the name of the article where this template is used.
 
|-
 
| '''pure_url'''
 
| optional
 
| Value of "yes" produces no label and no additional text but a "pure" standalone external link. This 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}}.
 
|-
 
| '''accessdate'''
 
| optional
 
| Full date when item was accessed. Should not be wikilinked.
 
|-
 
|}
 
  
 +
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 }}
  
The template can also use a short notation by specifying the first three parameters without the parameter name (see example below).
+
=== Using tab parameter ===
  
=== Examples ===
+
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}}
  
; Group or artist
+
Short ID:
*<nowiki>{{</nowiki>Allmusic|id=p4739|label=Led Zeppelin<nowiki>}}</nowiki>
+
* 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}}
  
expands to&nbsp;
+
=== Using tab name with id parameter ===
  
*{{Allmusic|id=p4739|label=Led Zeppelin}}  
+
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}}
  
 +
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}}
  
; Album (supplying accessdate)
+
=== Author name, access date ===
*<nowiki>{{</nowiki>Allmusic|class=album|id=r15973|label=News of the World|accessdate=Febuary 10, 2010<nowiki>}}</nowiki>
 
  
expands to&nbsp;
+
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}}
  
*{{Allmusic|class=album|id=r15973|label=News of the World|accessdate=Febuary 10, 2010}}
+
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 ===
  
;Song (short notation)
+
* 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}}
  
*<nowiki>{{</nowiki>Allmusic|song|t2454936|Dust in the Wind<nowiki>}}</nowiki>
+
=== No ID in template or Wikidata and not using ''pure_url'' ===
  
expands to&nbsp;
+
* Usage: {{tlcw|{{BASEPAGENAME}} }}
 +
* Output: {{{{BASEPAGENAME}} }}
  
*{{Allmusic|song|t2454936|Dust in the Wind}}  
+
== TemplateData ==
 +
{{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>
  
<includeonly>
+
== Tracking category ==
<!-- ADD CATEGORIES BELOW THIS LINE -->
+
* {{clc|AllMusic template missing ID and not in Wikidata}}
[[Category:Music external link templates]]
 
  
<!-- ADD INTERWIKIS BELOW THIS LINE -->
+
== See also ==
[[ca:Plantilla:Allmusicguide]]
+
* {{tl|AllMovie title}}
[[de:Vorlage:Allmusic Guide]]
+
* {{tl|AllMovie name}}
[[es:Plantilla:Allmusicguide]]
+
* {{tl|AllGame}}
[[fr:Modèle:Allmusic]]
 
[[hu:Sablon:Amg]]
 
[[id:Templat:Allmusicguide]]
 
[[ja:Template:Amg]]
 
[[ka:თარგი:Amg]]
 
[[ko:틀:Amg]]
 
[[nl:Sjabloon:Allmusicguide]]
 
[[pt:Predefinição:Allmusic]]
 
[[ru:Шаблон:Allmusic new]]
 
[[sd:سانچو:Amg]]
 
[[th:แม่แบบ:Allmusicguide]]
 
[[tr:Şablon:Allmusicguide]]
 
[[uk:Шаблон:Amg]]
 
[[vi:Tiêu bản:Allmusicguide]]
 
[[zh:Template:Allmusicguide]]
 
  
</includeonly>
+
<includeonly>{{Sandbox other||
 +
<!-- Categories go here and interwikis go in Wikidata. -->
 +
[[Category:Music external link templates]]
 +
[[Category:Music source templates]]
 +
[[Category:WikiProject Albums templates]]
 +
[[Category:People and person external link templates]]
 +
[[Category:External link templates using Wikidata]]
 +
[[Category:Templates using multiple Wikidata external identifiers]]
 +
[[Category:Templates that add a tracking category]]
 +
}}</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