Template:Defn/doc

The template is used in template-structured glossaries to create definitions of terms. It is a wrapper for , the description list definition HTML element. The template has a mnemonic redirect at.

Basic usage:

Links, inline templates, reference citations, wikimarkup styles, etc., can be applied to the definition. Technically, the undefined part is optional if the content of the definition does not contain the "=" character, but as any editors can add content, including templates with this character in them, it is always safest to explicitly name the parameter. The 1 parameter can also be called defn for those who don't care for numeric parameters.
 * This will work:
 * This will fail:

More complex usage is typically:

{{#ifeq:{{BASEPAGENAME}}|Defn|

Images, hatnotes and other content

 * }}

Images, hatnotes and other "add-in" content intended to immediately follow the  They  be placed between the  and  or it will break the glossary markup. Images can, of course, be placed elsewhere within the, and bottom-notes like more can be placed at the ends of but s. 

colour ball: Set of Snookerballs.png

In snooker, any of the s that are not.

{{#ifeq:{{BASEPAGENAME}}|Defn|

Multiple definitions for one term

 * }}

If a single has multiple definitions, they are simply numbered with the parameter explicitly. Think of the parameter as standing for "}nd or later definition". You can also call it no, for "No.", if you prefer: Example:



blubbermonster: Lorem ipsum dolor sit amet. Consectetur adipisicing elit.

Because of the uneven length of definitions, it is usually more convenient to put the 2 before the 1 description:

or

This is a very robust method, because it permits complex content like block quotations, nested lists, cross-reference hatnotes, and other block-level markup inside each definition. The definitions can also be independently linked.

Use of a hatnote with a numbered definition requires manual numbering or it will look weird:

{{#ifeq:{{BASEPAGENAME}}|Defn|

Making the definition independently linkable

 * }}

To enable a link directly to a specific definition, you can manually add an template, or name the definition with its  or an abbreviation thereof (must be unique on the page for each term, but should be the same for multiple definitions of the same term). This is done with the term parameter; it must begin with an alphabetic character (a–z, A–Z), and may include digits (0–9), hyphens ("-"), and underscores ("_"). This will produce a #-link target ID in the form, where the # is the number of the definition (see above), defaulting to "1". Example:



blubbermonster: Lorem ipsum dolor sit amet. Consectetur adipisicing elit. snorkelweasel (noun): Ut enim ad minim veniam

 HTML output:

 blubbermonster 

1.&#160;&#160;Lorem ipsum dolor sit amet.

2.&#160;&#160;Consectetur adipisicing elit.

 snorkelweasel (noun) 

Ut enim ad minim veniam

</dl>

The IDs blubbermonster-defn1, blubbermonster-defn2, and snorkelweasel_noun-defn1 are all individually linkable, e.g. as. This is especially useful for cross-references within the glossary, e.g.

{{#ifeq:{{BASEPAGENAME}}|Defn|

Languages

 * }}

There is no lang parameter, as on English Wikiversity all definitions are necessarily in English. For uses of glossary markup for non-glossary purposes in which some content may be in a foreign language, use language templates. E.g. in a list of film title translations formatted using glossary markup:

Titles of La Vie en Rose in various languages: French: La Vie en Rose English: Life in Pink ...

{{#ifeq:{{BASEPAGENAME}}|Defn|

Examples

 * }}

This shows both a very simple and a rather complex instance:

<td style="border: 1px solid black; vertical-align: top;">

applesnorkel: Definition of term 1.

arglefarst: Beginning of first definition of term 2

Conclusion of first definition of term 2. Second definition of term 2.

{{#ifeq:{{BASEPAGENAME}}|Defn|

Applying CSS styles to the definition

 * }}

Applying CSS styles to the definition The style parameter will pass CSS styling on to the  element, e.g. font-family:serif; or whatever. This feature is rarely if ever needed in articles, but can be useful for things like matching custom user page style.

{{#ifeq:{{BASEPAGENAME}}|Defn| {{Gloss/doc}} {{Term/doc}}