https://nordiclarp.org/w/index.php?title=Template:Hatnote_inline/doc&feed=atom&action=historyTemplate:Hatnote inline/doc - Revision history2024-03-29T01:31:46ZRevision history for this page on the wikiMediaWiki 1.34.2https://nordiclarp.org/w/index.php?title=Template:Hatnote_inline/doc&diff=7092&oldid=prevJohannes Axner: 1 revision imported2018-12-29T00:39:01Z<p>1 revision imported</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">Revision as of 00:39, 29 December 2018</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>Johannes Axnerhttps://nordiclarp.org/w/index.php?title=Template:Hatnote_inline/doc&diff=7091&oldid=preven>Pauli133 at 01:51, 5 April 20182018-04-05T01:51:46Z<p></p>
<p><b>New page</b></p><div>{{Documentation subpage}}<br />
{{lua|Module:Hatnote inline}}<br />
<br />
{{Warning|1=This is a meta-template for development of additional, more specific templates. If you intend to use the template inline in articles or other pages, use {{tlx|crossreference}} (shortcuts or {{tlx|crossref}} and {{tlx|xref}}) or other specific templates based on this metatemplate, e.g. {{tlx|seeabove}} and {{tlx|seebelow}}.}}<br />
<br />
The {{tl|Hatnote inline}} meta-template formats text into a standardized style for an inline (not block-level) variant of a [[Wikipedia:Hatnote]], a short note placed at the point of insertion, to link to more information or otherwise cross-reference another Wikipedia page. like this: {{hatnote inline|Example inline hatnote text.}} <!--See [[:Category:Cross-reference templates]] for a list. of templates derived from this meta-template.--><br />
<br />
The most common uses for this meta-template are:<br />
* Inline "''(See also ...)''"-type parenthetical [[MOS:CROSSREF|Wikipedia crossreferences]] to other Wikipedia pages, provided by the {{tlx|crossreference}} template and its progeny. These are [[WP:SELFREF|unprintworthy Wikipedia self-references]].<br />
* Hatnotes inside definitions in [[Wikipedia:Manual of Style/Glossaries|template-formatted glossaries]], provided by the {{tlx|ghat}} template. These are printworthy, as they refer to content on the same page.<br />
<br />
== Usage ==<br />
<br />
; Basic usage:<br />
{{tlx|hatnote inline|{{var|text}}}}<br />
<br />
; All parameters:<br />
{{tlx|hatnote inline|{{var|text}}|extraclasses{{=}}{{var|class1 class2}}|selfref{{=}}yes|category{{=}}no}}<br />
<br />
The meta-template does not automatically create links of any kind. Links and other desired formatting must be explicitly added, using normal [[Wikipedia:Cheatsheet|Wikipedia markup]].<br />
<br />
== Parameters ==<br />
<br />
This template accepts the following parameters:<br />
* {{para|1}} or {{para|text}} or {{para|content}} the inline hatnote's text (required). While the explicit naming of this parameter with <code>1=</code>, <code>text=</code>, or <code>content=</code> is not required, it is always safest to use it this way, since any <code>=</code> character in the text will break the template if the parameter is unnamed.<br />
* {{para|class}} or {{para|extraclasses}} any extra CSS classes to be added. This should not normally be used.<br />
* {{para|selfref|no}} &ndash; if set to <kbd>no</kbd> (or <kbd>n</kbd>, <kbd>false</kbd>, <kbd>0</kbd>, etc.) removes the default CSS class <code>selfref</code>, used to denote unprintworthy self-references to Wikipedia {{crossref|(see [[Template:Selfref]] for more information)}}. This option should not be used to indicate a non-selfref on cross-article links, only links within the same article (and the derived shorthand templates {{tlx|See above}} and {{tlx|See below}} do this automatically). The parameter alias {{para|printworthy|yes}} (or with any other value, like <kbd>y</kbd>, <kbd>true</kbd>, <kbd>1</kbd>, etc.) has the same effect as {{para|selfref|no}}. Note the attempting to manually supply a "this is a selfref" value with {{para|selfref|yes}} or {{para|printworthy|no}} will not have the desired effect (which is the default anyway); {{em|the meta-template is set to selfref by default}}, since most uses are self-references (only those within the same article as the template are not).<br />
* {{para|category}} if set to <kbd>no</kbd> (or <kbd>n</kbd>, <kbd>false</kbd>, <kbd>0</kbd>, etc., 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. This should not normally be used.<br />
<br />
== Technical details ==<br />
<br />
The meta-template places an HTML {{tag|span}} container around the text entered as its first, required parameter, upon which it provides standardized formatting (italicized in most displays, and only stylistically, not as semantic emphasis); 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.<br />
<br />
The HTML code produced by this template looks like this:<br />
<br />
* <code><nowiki><span class="hatnote"></nowiki>{{var|hatnote text}}<nowiki></span></nowiki></code><br />
<br />
This is the same class used by the {{tag|div|o}}-based {{tlx|hatnote}} template, the block display of which is controlled by a separate <code>div.hatnote</code> directive in [[Mediawiki:Common.css]].<br />
<br />
The output is produced by [[Module:Hatnote inline]].<br />
<br />
== See also ==<br />
* [[Template:Hatnote templates documentation]], for all the block-format hatnotes<br />
<br />
=== Templates based on this meta-template ===<br />
* {{tl|Crossreference}} (a.k.a. {{tl|Crossref}}, {{tl|Xref}}) &ndash; Template for inline crossreferences to (usually) other Wikipedia pages (unprintworthy in most cases)<br />
* {{tl|Ghat}} &ndash; Hatnote template for use in [[MOS:GLOSSARIES|template-structured glossaries]] (printworthy)<br />
* {{tl|See above}} and {{tl|See below}} &ndash; some more specific templates than {{tl|Crossreference}} for use on same page only (printworthy)<br />
<includeonly>{{sandbox other||<br />
[[Category:Cross-reference templates|{{PAGENAME}}]]<br />
[[Category:Hatnote templates| ]]<br />
}}</includeonly></div>en>Pauli133