Template:Hatnote group/doc: Difference between revisions
(Created page with "{{Documentation subpage}} {{tsh|hatgrp}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> {{Lua|Module:Hatnote group}} This template applies Module:Hatnote group to merge hatnotes it is given as input; this has the net effect of making them formatted inline relative to one another. For example: <syntaxhighlight lang="wikitext"> {{about|USE1||PAGE1}} {{redirect|REDIRECT|USE2|PAGE2}} <...") |
CleanupBot (talk | contribs) m (clean up) |
||
Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
{{tsh|hatgrp}} | {{tsh|hatgrp}} | ||
<!-- Please place categories where indicated at the bottom of this page and interwikis at | <!-- Please place categories where indicated at the bottom of this page and interwikis at Bharatdata (see [[Bharatpedia:Bharatdata]]) --> | ||
{{Lua|Module:Hatnote group}} | {{Lua|Module:Hatnote group}} | ||
Line 60: | Line 60: | ||
==TemplateData== | ==TemplateData== | ||
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
<!-- Categories below this line, please; interwikis at | <!-- Categories below this line, please; interwikis at Bharatdata --> | ||
[[Category:Hatnote templates| ]] | [[Category:Hatnote templates| ]] | ||
}}</includeonly> | }}</includeonly> |
Latest revision as of 10:25, 5 December 2023
![]() | This is a documentation subpage for Template:Hatnote group. It contains usage information, categories and other content that is not part of the original template page. |
![]() | This template uses Lua: |
This template applies Module:Hatnote group to merge hatnotes it is given as input; this has the net effect of making them formatted inline relative to one another. For example:
{{about|USE1||PAGE1}}
{{redirect|REDIRECT|USE2|PAGE2}}
would normally display as:
but, when wrapped in this template:
{{hatnote group|
{{about|USE1||PAGE1}}
{{redirect|REDIRECT|USE2|PAGE2}}
}}
displays as
Technically, it changes the hatnotes by converting their div
wrappers into span
wrappers, wrapping the group in a new hatnote div
, and migrating classes appropriately. Classes are migrated to the appropriate span
, unless every hatnote in the group includes that class, in which case the class will be migrated to the new div
wrapper. For example:
{{hatnote|extraclasses=example demonstration |Hatnote 1}}
{{hatnote|extraclasses=example |Hatnote 2}}
{{hatnote|extraclasses=example |Hatnote 3}}
would normally be rendered to:
<div role="note" class="hatnote navigation-not-searchable example demonstration">Hatnote 1</div>
<div role="note" class="hatnote navigation-not-searchable example">Hatnote 2</div>
<div role="note" class="hatnote navigation-not-searchable example">Hatnote 3</div>
but, when wrapped in this template, becomes:
<div role="note" class="hatnote navigation-not-searchable example">
<span class="demonstration">Hatnote 1</span>
<span>Hatnote 2</span>
<span>Hatnote 3</span>
</div>
TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.
TemplateData for Hatnote group
Groups multiple hatnotes onto a single line.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Hatnote group content | 1 | Two or more hatnote template invocations, and nothing else. | String | required |