![]() | This is a documentation subpage for Template:Glossary of contract bridge. It may contain usage information, categories and other content that is not part of the original template page. |
Purpose
editThe template {{gcb}} generates a link to a specific entry in the Glossary of contract bridge terms.
Usage
editThe template is normally placed in-line where the running text uses a term in the glossary. It may be listed in the "See also" section, same as an article title in double brackets would be listed.
Parameters
editThe template uses two parameters id and display with ordinary syntax {{gcb |id= |display= }}
.
Parameter id identifies a location within the glossary. It is practically mandatory; if id is not defined, the template generates a link to the "Glossary of contract bridge terms" as a whole.
To find the id value for a glossary entry, open the glossary in edit mode and examine the code for that entry. See entry 'Deal' for example:
<span id="deal">Deal</span>: 1) (Noun) One particular allocation of 52 cards ...
Here id="deal"
gives the parameter value that should be used without quotation marks in {{gcb}}.
If there are no span tags <span id="...">
and </span>
in the glossary code, see Glossary entry without anchor for instruction.
Parameter display specifies the linkname: the text to be displayed and highlighted at that point in the article where the template is used. If display is not defined, the linkname is the same as the id value. In turn, the id value given in the glossary code is likely to be the glossary term itself if that is short. For example, the glossary uses id=deal for 'Deal' but id=doubledummy for 'Double dummy'.
Examples
edit- Correct use
Code | Displays | Comments |
---|---|---|
{{gcb |id=deal}}
|
deal | linked to 'Deal' in the Glossary of contract bridge terms. |
{{gcb |id=deal |display=deal}}
|
deal | |
{{gcb |id=deal |display=deals}}
|
deals |
Parameter labels 'id=' and 'display=' make the code unambiguous but they are not mandatory.
Code | Displays | Comments |
---|---|---|
{{gcb |deal |deals}}
|
deals | If two unlabeled parameter values are given, the first value is taken to be id and the second to be display. |
{{gcb |id=deal}}
|
deal | If id alone is defined, with or without a label, display is equal to id. |
{{gcb |deal}}
|
deal |
- Incorrect use
Incorrect parameter labels may result in operational links but incorrect displays.
Code | Displays | Comments |
---|---|---|
{{gcb |id=deal |name=deals}}
|
deal | Incorrect parameter label is ignored. The link operates as intended but its display is incorrect as 'deals' was intended. |
{{gcb |name=deals |id=deal}}
|
deal | |
{{gcb |deal |name=deals}}
|
deal | Incorrect parameter label. The link operates as intended but its display is incorrect. |
{{gcb |name=deals |deal}}
|
deal |
Glossary entry without anchor
editNo link is possible, using the template or otherwise, to a glossary entry without an anchor (glossary id value). Our glossary sets id values using span tags, as in the code for entry 'Deal' (quoted above). Without that, the glossary code begins with a term between a semicolon and a colon:
;Defensive bidding:
To enable linking such an entry, the editor should set id with span tags as for 'Deal'. (For the entry 'Defensive bidding', current style is id="defensivebidding".)
Term without glossary entry
editEither write a new entry with an appropriate anchor (id defined using span tags) or do not use {{gcb}} in the base article.