Difference between revisions of "Template:GroveMusic/doc"

From blackwiki
Jump to navigation Jump to search
imported>Vanisaac
m (→‎Display: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
imported>Auric
(redirect)
 
Line 1: Line 1:
{{Documentation subpage}}
+
#REDIRECT [[Template:Cite Grove/doc]]
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
  
== Usage ==
+
{{R to doc}}
 
 
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:
 
<nowiki>{{ GroveMusic | id=</nowiki>''article-id''<nowiki> }}</nowiki>
 
<nowiki>{{ GroveMusic | match=</nowiki>''string''<nowiki> }}</nowiki>
 
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
 
::<nowiki>http://www.oxfordmusiconline.com/subscriber/article/grove/music/O900083</nowiki>
 
:is linked by
 
::<nowiki>{{ GroveMusic | id=O900083 }}</nowiki>.
 
: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 <code>id</code> 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 <code>match</code> parameter.
 
* <nowiki>{{ GroveMusic | match=Giuseppe Verdi }}</nowiki>
 
* <nowiki>{{ GroveMusic | id=O900083 | match=Alessandro Stradella }}</nowiki>
 
will display as
 
* {{ GroveMusic | match=Giuseppe Verdi }}
 
* {{ GroveMusic | id=O900083 | match=Alessandro Stradella }}
 
 
 
  <nowiki>{{ GroveMusic | label=</nowiki>''linktext''<nowiki> }}</nowiki>
 
You can use the <code>label=''linktext''</code> option to supply a linking text if there is no <code>match</code> parameter, or to override the default linking text. Examples:
 
* <nowiki>{{ GroveMusic | match=Giuseppe Verdi | label=Joe Green }}</nowiki>
 
* <nowiki>{{ GroveMusic | id=O900083 | match=Alessandro Stradella | label=''Alessandro Stradella'' (the opera) }}</nowiki>
 
* <nowiki>{{ GroveMusic | id=26888 | label=Alessandro Stradella (the composer) }}</nowiki>
 
 
 
will display as:
 
* {{ 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) }}
 
 
 
<nowiki>{{ GroveMusic | linkonly=t }}</nowiki>
 
To suppress the rest of the words in the template output, and get the bare link on its own, use the <code>linkonly=t</code> option
 
*<nowiki>[[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}}</nowiki>
 
will display as
 
*[[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}}
 
where the template parameters act as follows:
 
* <code>GroveMusic</code>: Name of the template
 
* <code>id=29191</code>: The article-id within the Grove Music Online site for the main Verdi biography
 
* <code>match=Giuseppe Verdi</code>: A fall back search string, which will also set the default link text to 'Giuseppe Verdi'
 
* <code>label=Verdi, Giuseppe</code>:  Overrides the default link text, to use the form as it appears in the printed volume
 
* <code>linkonly=t</code>: Suppresses the rest of the template output, allowing the link to be embedded into citation format
 
 
 
<includeonly>{{Sandbox other||
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:Music external link templates]]
 
}}</includeonly>
 

Latest revision as of 15:40, 11 January 2021