Difference between revisions of "Template:AllMusic/doc"
Jump to navigation
Jump to search
(sl:Predloga:Allmusic) |
blackwiki>IbLeo (Documentation for new version recently promoted from the sandbox) |
||
| Line 10: | Line 10: | ||
| class = | | class = | ||
| id = | | id = | ||
| + | | tab = | ||
| label = | | label = | ||
| + | | first = | ||
| + | | last = | ||
| accessdate = | | accessdate = | ||
}} | }} | ||
| Line 16: | Line 19: | ||
;Horizontal layout: | ;Horizontal layout: | ||
| − | <pre>{{Allmusic |class= |id= |label= |accessdate= }}</pre> | + | <pre>{{Allmusic |class= |id= |tab= |label= |first= |last= |accessdate= }}</pre> |
| + | |||
| + | ;Short layout: | ||
| + | Valid with these three parameters only: | ||
| + | <pre>{{Allmusic |<class> |<id> |<label>}}</pre> | ||
=== Parameters === | === Parameters === | ||
| Line 23: | Line 30: | ||
|- style="background-color:#f2f2f4" | |- style="background-color:#f2f2f4" | ||
! Parameter | ! Parameter | ||
| − | ! class="unsortable" style="width: | + | ! class="unsortable" style="width:100px" | Type |
! class="unsortable"|Description | ! class="unsortable"|Description | ||
|- | |- | ||
| '''class''' | | '''class''' | ||
| optional | | optional | ||
| − | | Class of information, possible are "artist", "album", "song", "work" or "explore". Value for this parameter corresponds part of [[URL]] "following www.allmusic.com/". | + | | 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''' | | '''id''' | ||
| '''mandatory''' | | '''mandatory''' | ||
| − | | Identification of information. Corresponds to | + | | 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''' | | '''label''' | ||
| optional | | optional | ||
| − | | Label to display the link, | + | | 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''' | | '''pure_url''' | ||
| optional | | optional | ||
| − | | Value of "yes" produces no label and no additional text but | + | | 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''' | | '''accessdate''' | ||
| Line 48: | Line 67: | ||
|} | |} | ||
| − | |||
| − | |||
=== Examples === | === Examples === | ||
| Line 58: | Line 75: | ||
expands to | expands to | ||
| − | *{{Allmusic|id=p4739|label=Led Zeppelin}} | + | *{{Allmusic/sandbox|id=p4739|label=Led Zeppelin}} |
| Line 66: | Line 83: | ||
expands to | expands to | ||
| − | *{{Allmusic|class=album|id=r15973|label=News of the World|accessdate=Febuary 10, 2010}} | + | *{{Allmusic/sandbox|class=album|id=r15973|label=News of the World|accessdate=Febuary 10, 2010}} |
| Line 75: | Line 92: | ||
expands to | expands to | ||
| − | *{{Allmusic|song|t2454936|Dust in the Wind}} | + | *{{Allmusic/sandbox|song|t2454936|Dust in the Wind}} |
| + | |||
| + | |||
| + | ; Using tab parameter | ||
| + | *<nowiki>{{</nowiki>Allmusic|id=p4739|tab=discography|label=Discography of Led Zeppelin<nowiki>}}</nowiki> | ||
| + | |||
| + | expands to | ||
| + | |||
| + | *{{Allmusic/sandbox|id=p4739|tab=discography|label=Discography of Led Zeppelin}} | ||
| + | |||
| + | |||
| + | ; Accessing tab in tab with sort (not using tab parameter) | ||
| + | *<nowiki>{{</nowiki>Allmusic|id=p4739/discography/compilations/title-asc|label=Compilations of Led Zeppelin sorted by title<nowiki>}}</nowiki> | ||
| + | |||
| + | expands to | ||
| + | |||
| + | *{{Allmusic/sandbox|id=p4739/discography/compilations/title-asc|label=Compilations of Led Zeppelin sorted by title}} | ||
| + | |||
| + | |||
| + | ; Author name | ||
| + | *<nowiki>{{</nowiki>Allmusic|class=album|id=r11465|label=Physical Graffiti|first=Stephen Thomas|last=Erlewine|accessdate=Febuary 10, 2010<nowiki>}}</nowiki> | ||
| + | |||
| + | expands to | ||
| + | |||
| + | *{{Allmusic/sandbox|class=album|id=r11465|label=Physical Graffiti|first=Stephen Thomas|last=Erlewine|accessdate=Febuary 10, 2010}} | ||
| + | |||
<includeonly> | <includeonly> | ||
Revision as of 19:24, 3 January 2011
| This is a documentation subpage for Template:AllMusic. It contains usage information, categories and other content that is not part of the original template page. |
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.
Usage
- Vertical layout
{{Allmusic
| class =
| id =
| tab =
| label =
| first =
| last =
| accessdate =
}}
- Horizontal layout
{{Allmusic |class= |id= |tab= |label= |first= |last= |accessdate= }}
- Short layout
Valid with these three parameters only:
{{Allmusic |<class> |<id> |<label>}}
Parameters
| Parameter | Type | 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 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 {{Cite web}}, embedding {{Allmusic}} in {{Cite web}}. |
| accessdate | optional | Full date when item was accessed. Should not be wikilinked. |
Examples
- Group or artist
- {{Allmusic|id=p4739|label=Led Zeppelin}}
expands to
- Album (supplying accessdate)
- {{Allmusic|class=album|id=r15973|label=News of the World|accessdate=Febuary 10, 2010}}
expands to
- News of the World at AllMusic. Retrieved Febuary 10, 2010.
- Song (short notation)
- {{Allmusic|song|t2454936|Dust in the Wind}}
expands to
- Using tab parameter
- {{Allmusic|id=p4739|tab=discography|label=Discography of Led Zeppelin}}
expands to
- Accessing tab in tab with sort (not using tab parameter)
- {{Allmusic|id=p4739/discography/compilations/title-asc|label=Compilations of Led Zeppelin sorted by title}}
expands to
- Author name
- {{Allmusic|class=album|id=r11465|label=Physical Graffiti|first=Stephen Thomas|last=Erlewine|accessdate=Febuary 10, 2010}}
expands to
- Erlewine, Stephen Thomas. Physical Graffiti at AllMusic. Retrieved Febuary 10, 2010.