Difference between revisions of "Template:AllMusic/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>IbLeo
(Add Category:WikiProject Albums templates)
m (78 revisions imported)
 
(35 intermediate revisions by 24 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}} }}
  
;Short layout:
+
{{tlcw|{{BASEPAGENAME}} | title{{=}} <var>Text displayed in link</var> }}
Valid with these three parameters only:
 
<pre>{{Allmusic |<class> |<id> |<label>}}</pre>
 
  
=== Parameters ===
+
== Examples ==
  
{| border="1" class="prettytable sortable"
+
=== Artist or group (class not specified, defaults to artist) ===
|- style="background-color:#f2f2f4"
 
! Parameter
 
! 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 part of [[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 "pure" standalone external link. This opportiunity is mainly intended for the automized 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.
 
|-
 
|}
 
  
 +
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}}
  
=== Examples ===
+
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}}
  
; Group or artist
+
=== Album (class not specified, defaults to album) ===
*<nowiki>{{</nowiki>Allmusic|id=p4739|label=Led Zeppelin<nowiki>}}</nowiki>
 
  
expands to&nbsp;
+
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}}
  
*{{Allmusic/sandbox|id=p4739|label=Led Zeppelin}}  
+
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) ===
  
; Album (supplying accessdate)
+
Full ID:
*<nowiki>{{</nowiki>Allmusic|class=album|id=r15973|label=News of the World|accessdate=Febuary 10, 2010<nowiki>}}</nowiki>
+
* 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}}
  
expands to&nbsp;
+
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}}
  
*{{Allmusic/sandbox|class=album|id=r15973|label=News of the World|accessdate=Febuary 10, 2010}}
+
=== Composition (class not specified, defaults to composition) ===
  
 +
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 }}
  
;Song (short notation)  
+
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 }}
  
*<nowiki>{{</nowiki>Allmusic|song|t2454936|Dust in the Wind<nowiki>}}</nowiki>
+
=== Using tab parameter ===
  
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|song|t2454936|Dust in the Wind}}  
+
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}}
  
 +
=== Using tab name with id parameter ===
  
; Using tab parameter
+
Full ID:
*<nowiki>{{</nowiki>Allmusic|id=p4739|tab=discography|label=Discography of Led Zeppelin<nowiki>}}</nowiki>
+
* 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|id=p4739|tab=discography|label=Discography of Led Zeppelin}}
+
=== 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}}
  
; Accessing tab in tab with sort (not using tab parameter)
+
Short ID:
*<nowiki>{{</nowiki>Allmusic|id=p4739/discography/compilations/title-asc|label=Compilations of Led Zeppelin sorted by title<nowiki>}}</nowiki>
+
* 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}}
  
expands to&nbsp;
+
=== Using ''pure_url'' with a citation template ===
  
*{{Allmusic/sandbox|id=p4739/discography/compilations/title-asc|label=Compilations of Led Zeppelin sorted by title}}
+
* 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'' ===
  
; Author name
+
* Usage: {{tlcw|{{BASEPAGENAME}} }}
*<nowiki>{{</nowiki>Allmusic|class=album|id=r11465|label=Physical Graffiti|first=Stephen Thomas|last=Erlewine|accessdate=Febuary 10, 2010<nowiki>}}</nowiki>
+
* Output: {{{{BASEPAGENAME}} }}
  
expands to&nbsp;
+
== 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>
  
*{{Allmusic/sandbox|class=album|id=r11465|label=Physical Graffiti|first=Stephen Thomas|last=Erlewine|accessdate=Febuary 10, 2010}}
+
== Tracking category ==
 +
* {{clc|AllMusic template missing ID and not in Wikidata}}
  
 +
== 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: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]]
[[ca:Plantilla:Allmusicguide]]
+
[[Category:Templates using multiple Wikidata external identifiers]]
[[es:Plantilla:Allmusicguide]]
+
[[Category:Templates that add a tracking category]]
[[fr:Modèle:Allmusic]]
+
}}</includeonly>
[[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]]
 
[[sl:Predloga:Allmusic]]
 
[[th:แม่แบบ:Allmusicguide]]
 
[[tr:Şablon:Allmusicguide]]
 
[[uk:Шаблон:Amg]]
 
[[vi:Tiêu bản:Allmusicguide]]
 
[[zh:Template:Allmusicguide]]
 
 
 
</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