Jump to content

Template:Hatnote inline/doc

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by SMcCandlish (talk | contribs) at 19:04, 18 October 2014 (link fix). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

This meta-template formats text into the standard style for an inline (not block-level) Wikipedia:Hatnote variant. The two most common uses for this are for inline "(See also ...)" inline Wikipedia cross-references, provided by the {{crossref}} template, and hatnotes (also generally cross-references) inside definitions in template-formatted glossaries, provided by the {{ghat}} template.

{{Hatnote-inline}} produces a short note placed at the point of insertion, to link to more information or otherwise cross-reference another Wikipedia page.

Inline cross-references look like this: Example inline hatnote text.

Function

This template is primarily used to add a correctly formatted inline cross-reference to a page. Often, but not always, this is a see other page link in a parenthetical. It places an HTML <span>...</span> container around the text entered as its first, required parameter, upon which it provides standardized formatting (italicized in most displays); it also uses CSS classes to isolate the contained code to make sure that it is interpreted correctly and can be acted upon independently of true article content.

The template does not automatically create links of any kind. Links and other desired formatting must be explicitly added, using normal Wikipedia markup.

Usage

Basic usage
{{hatnote-inline|text}}
All parameters
{{hatnote-inline|text|extraclasses=class1 class2|selfref=yes|category=no}}

Parameters

This template accepts the following parameters:

  • 1 – the cross-reference text. (required)
  • extraclasses – any extra CSS classes to be added. For example, the {{see also}} template adds the classes |extraclasses=boilerplate seealso.
  • selfref – if set to "yes", "y", "true" or "1", adds the CSS class "selfref". This is used to denote self-references to Wikipedia. See Template:Selfref for more information.
  • category – if set to "no", "n", "false", or "0", suppresses the error tracking category (Category:Hatnote templates with errors). This only has an effect if the first positional parameter (the hatnote text) is omitted.

Example

  • {{hatnote-inline|See [[Taxonomic nomenclature]] for more detail.}}See Taxonomic nomenclature for more detail.

Technical details

The HTML code produced by this template looks like this:

  • <span class="hatnote">hatnote text</span>

This is the same class used by the <div>-based {{hatnote}} template, the block display of which is controlled by a separate div.hatnote directive in Mediawiki:Common.css.

The code is produced by Module:Hatnote-inline.

Redirects

See also

Templates based on this meta-template