Difference between revisions of "Template:Birdgloss/doc"

From blackwiki
Jump to navigation Jump to search
imported>Fuhghettaboutit
m (typo)
imported>Fuhghettaboutit
(Copyedit)
Line 1: Line 1:
 
{{Documentation subpage|[[Template:birdgloss]]}}
 
{{Documentation subpage|[[Template:birdgloss]]}}
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
The {{tlx|birdgloss}} template is used to create links from a word or phrase to corresponding entry in the [[glossary of bird terms]] article.  It makes proper use of the <code><nowiki><dfn></nowiki></code> HTML element (as documented at the parent meta-template, [[Template:glossary link]]).  The {{tlx|glossary link internal}} variant (commonly used with its shortcut {{tlx|gli}}, which does not use that markup (it is reserved for term entries), is usually used only inside the glossary itself, for cross-references to other entries within it, though it can also be used in other articles where the same term is linked twice because of article length (<code><nowiki><dfn></nowiki></code> should only be used once per term per page, as it means "this is the defining instance of this term on this page").
+
The {{tlx|birdgloss}} template is used to create links from a word or phrase to corresponding entry in the [[glossary of bird terms]] article.   
 +
 
 +
It makes use of the <code><nowiki><dfn></nowiki></code> HTML element (as documented at the parent meta-template, [[Template:glossary link]]).  The {{tlx|glossary link internal}} variant (commonly used with its shortcut {{tlx|gli}}, which does not use that markup (it is reserved for term entries), is usually used only ''inside the glossary itself'', for cross-references to other entries within it, though it can also be used in other articles where the same term is linked twice because of article length (<code><nowiki><dfn></nowiki></code> should only be used once per term per page, as it means "this is the defining instance of this term on this page").
  
 
==Usage==
 
==Usage==
 +
This template makes it very simple to add links, in article prose, talk pages, etc., to entries in the [[Glossary of bird terms]], a [[WP:MOSGLOSS|stand-alone glossary]] list article. It takes one or two parameters, depending on needs, as detailed below.
  
<u>Syntax</u>:<br/>
+
===Syntax===
From an article to the glossary:
+
If the text or phrase being linked matches a glossary entry (or an anchor present for a term—the glossary attempts to provide anchors for all alternate names, and grammatical variations), regardless of upper or lower case, you can simply use:
 +
*{{tlx|birdgloss|<var>terms or phrase in article that is included in the glossary</var>}}
 +
If, however, the exact term or phrase is not present in the glossary directly or in an anchor, then you can "pipe" the link:
 
*{{tlx|birdgloss|<var>term in glossary</var>|<var>text in article</var>}}
 
*{{tlx|birdgloss|<var>term in glossary</var>|<var>text in article</var>}}
If the text being linked matches the name of the glossary entry (or an anchor present for a term—the glossary attempts to provide anchor for all alternate names, and grammatical variations), regardless of upper or lower case, you can simply use:
+
This template will also handle suffixes like plurals, etc., added onto entries:
*{{tlx|birdgloss|<var>terms or phrase in article that is included in the glossary</var>}}
 
It will also handle suffixes like plurals, etc., added onto entries:
 
 
*<code><nowiki>{{</nowiki>birdgloss|<var>text in article that is a term in glossary</var><nowiki>}}</nowiki>ized</code>
 
*<code><nowiki>{{</nowiki>birdgloss|<var>text in article that is a term in glossary</var><nowiki>}}</nowiki>ized</code>
  
or (in [[glossary of bird terms]] itself, or for duplicate links in same article):
+
 
 +
In the [[glossary of bird terms]] itself, or for duplicate links in same article, use instead:
 
*{{tlx|gli|<var>term in glossary</var>|<var>text in article</var>}}
 
*{{tlx|gli|<var>term in glossary</var>|<var>text in article</var>}}
  
This template makes it very simple to add links, in article prose, talk pages, etc., to entries in the [[Glossary of bird terms]], a [[WP:MOSGLOSS|stand-alone glossary]] list article.  It takes one or two parameters, depending on needs, as detailed below.
+
===Examples===
 
+
:<code>The <nowiki>{{birdgloss|definitive plumage}}</nowiki> of a whooping crane is mostly pure white.</code>
<u>Wikitext examples</u>:
+
<u>Result</u>:{{in5}}<code>The {{birdgloss|definitive plumage}} of a whooping crane is mostly pure white.</code>
 
 
{{in5}}<code>The <nowiki>{{birdgloss|definitive plumage|definitive}}</nowiki> plumage of a whooping crane is mostly pure white.</code>
 
 
 
Result:
 
 
 
{{in5}}The {{birdgloss|definitive plumage|definitive}} plumage of a whooping crane is mostly pure white.
 
 
 
The first parameter is the <em>exact</em> name of the term to be linked to in [[Glossary of bird terms]] (or any alias of it as defined in the glossary with an {{tlx|anchor}}), and the second parameter is the text string to be wikilinked inside the article.
 
  
For example, in this case the term to be defined is covered at [[Glossary of bird terms#definitive plumage]], so ''definitive plumage'' is the first parameter.  
+
Here, the term to be defined is covered at [[Glossary of bird terms#definitive plumage]], so ''definitive plumage'' is the first and only parameter needed.
The second parameter is optional if the text string to be wikilinked from in the article is exactly the same (including case, plurality, etc.) as the glossary term (or alternative {{tnull|anchor}}}} in the first parameter:
 
 
 
:<code>The <nowiki>{{birdgloss|definitive plumage}}</nowiki> of a whooping crane is mostly pure white.</code>
 
  
Result:
+
:<code>The <nowiki>{{birdgloss|definitive plumage|definitive}}</nowiki> plumage of a whooping crane is mostly pure white.</code>
 +
<u>Result</u>:{{in5}}<code>The {{birdgloss|definitive plumage|definitive}} plumage of a whooping crane is mostly pure white.</code>
  
:<code>The {{birdgloss|definitive plumage}} of a whooping crane is mostly pure white.</code>
+
Here first parameter is the <em>exact</em> name of the term to be linked to in [[Glossary of bird terms]] (or any alias of it as defined in the glossary with an {{tlx|anchor}}), and the second parameter is the text string to be wikilinked inside the article.  
  
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |

Revision as of 20:13, 25 February 2017

The {{birdgloss}} template is used to create links from a word or phrase to corresponding entry in the glossary of bird terms article.

It makes use of the <dfn> HTML element (as documented at the parent meta-template, Template:glossary link). The {{glossary link internal}} variant (commonly used with its shortcut {{gli}}, which does not use that markup (it is reserved for term entries), is usually used only inside the glossary itself, for cross-references to other entries within it, though it can also be used in other articles where the same term is linked twice because of article length (<dfn> should only be used once per term per page, as it means "this is the defining instance of this term on this page").

Usage

This template makes it very simple to add links, in article prose, talk pages, etc., to entries in the Glossary of bird terms, a stand-alone glossary list article. It takes one or two parameters, depending on needs, as detailed below.

Syntax

If the text or phrase being linked matches a glossary entry (or an anchor present for a term—the glossary attempts to provide anchors for all alternate names, and grammatical variations), regardless of upper or lower case, you can simply use:

  • {{birdgloss|terms or phrase in article that is included in the glossary}}

If, however, the exact term or phrase is not present in the glossary directly or in an anchor, then you can "pipe" the link:

  • {{birdgloss|term in glossary|text in article}}

This template will also handle suffixes like plurals, etc., added onto entries:

  • {{birdgloss|text in article that is a term in glossary}}ized


In the glossary of bird terms itself, or for duplicate links in same article, use instead:

  • {{gli|term in glossary|text in article}}

Examples

The {{birdgloss|definitive plumage}} of a whooping crane is mostly pure white.

Result:     The definitive plumage of a whooping crane is mostly pure white.

Here, the term to be defined is covered at Glossary of bird terms#definitive plumage, so definitive plumage is the first and only parameter needed.

The {{birdgloss|definitive plumage|definitive}} plumage of a whooping crane is mostly pure white.

Result:     The definitive plumage of a whooping crane is mostly pure white.

Here first parameter is the exact name of the term to be linked to in Glossary of bird terms (or any alias of it as defined in the glossary with an {{anchor}}), and the second parameter is the text string to be wikilinked inside the article.