Difference between revisions of "Template:GroveMusic/doc"

From blackwiki
Jump to navigation Jump to search
imported>Jonesey95
(Replace ISBN magic link with template, per RFC)
imported>Vanisaac
m (→‎Display: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
Line 51: Line 51:
 
* <code>linkonly=t</code>: Suppresses the rest of the template output, allowing the link to be embedded into citation format
 
* <code>linkonly=t</code>: Suppresses the rest of the template output, allowing the link to be embedded into citation format
  
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
+
<includeonly>{{Sandbox other||
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:Music external link templates]]
 
[[Category:Music external link templates]]
 
}}</includeonly>
 
}}</includeonly>

Revision as of 16:08, 25 April 2020

Usage

This template searches for texts within Grove Music Online, part of the Oxford Music Online stable of online music resources. NB: These resources are available on a subscription basis only, so not all users of Wikipedia will be able to follow the link.

Syntax of required parameters

At least one of the following two parameters must be supplied:

{{ GroveMusic | id=article-id }}
{{ GroveMusic | match=string }}

where

  • article-id is Grove Music's unique identifier for a specific article. This is the final component of the address of the article's page, e.g. the page at
http://www.oxfordmusiconline.com/subscriber/article/grove/music/O900083
is linked by
{{ GroveMusic | id=O900083 }}.
If you use this form, the link leads directly to the article text.
  • string is the text to search for in Grove Music. The string should not be enclosed in quotes. If you use this form (without the id parameter), the user will be presented with a page of search results.

Note. As we have no guarantee that Oxford Music Online will not change the article ids at some point in the future, it would be good practice to think defensively, and supply both parameters. If both parameters are present, the template will take the id for preference and ignore the search string. If the article ids do change, the template can be edited to fall back to the search, and no links will break.

Display

The template will automatically create a suitable linktext from the match parameter.

  • {{ GroveMusic | match=Giuseppe Verdi }}
  • {{ GroveMusic | id=O900083 | match=Alessandro Stradella }}

will display as

  • Root, Deane L., ed. (2001). The New Grove Dictionary of Music and Musicians. Oxford University Press. Unknown parameter |match= ignored (help); Missing or empty |title= (help)
  • Grove Music Online (8th ed.). Oxford University Press. 2001. doi:10.1093/gmo/9781561592630.article.O900083. Unknown parameter |match= ignored (help); Missing or empty |title= (help)
 {{ GroveMusic | label=linktext }}

You can use the label=linktext option to supply a linking text if there is no match parameter, or to override the default linking text. Examples:

  • {{ GroveMusic | match=Giuseppe Verdi | label=Joe Green }}
  • {{ GroveMusic | id=O900083 | match=Alessandro Stradella | label=''Alessandro Stradella'' (the opera) }}
  • {{ GroveMusic | id=26888 | label=Alessandro Stradella (the composer) }}

will display as:

{{ GroveMusic | linkonly=t }}

To suppress the rest of the words in the template output, and get the bare link on its own, use the linkonly=t option

  • [[Roger Parker|Parker, Roger]] (1998), "{{GroveMusic|id=29191|match=Giuseppe Verdi|label=Verdi, Giuseppe|linkonly=t}}" in Stanley Sadie, (Ed.), ''The New Grove Dictionary of Opera'', Vol. Four. London: MacMillan Publishers, Inc. {{ISBN|0-333-73432-7}} {{ISBN| 1-56159-228-5}}

will display as

where the template parameters act as follows:

  • GroveMusic: Name of the template
  • id=29191: The article-id within the Grove Music Online site for the main Verdi biography
  • match=Giuseppe Verdi: A fall back search string, which will also set the default link text to 'Giuseppe Verdi'
  • label=Verdi, Giuseppe: Overrides the default link text, to use the form as it appears in the printed volume
  • linkonly=t: Suppresses the rest of the template output, allowing the link to be embedded into citation format