Difference between revisions of "Template:Hid/doc"

From blackwiki
Jump to navigation Jump to search
imported>Uzume
(-cats from sandbox)
imported>Voidxor
m (→‎Use: caps)
Line 13: Line 13:
 
The use of this template is illustrated by the following sortable table:
 
The use of this template is illustrated by the following sortable table:
 
{|class="wikitable sortable"
 
{|class="wikitable sortable"
|+[[House of Windsor]]
+
|+ [[House of Windsor]]
!class=unsortable|[[Wikitext]]
+
!class=unsortable| [[Wikitext]]
!class=unsortable|[[Help:Sorting#Sorting with a hidden key|Hidden prefix]]
+
!class=unsortable| [[Help:Sorting#Sorting with a hidden key|Hidden prefix]]
!sort without key
+
! Sort without key
!sort with key
+
! Sort with key
 
|-
 
|-
 
|<nowiki>{{hid|A}}[[Edward VII of the United Kingdom]]</nowiki>
 
|<nowiki>{{hid|A}}[[Edward VII of the United Kingdom]]</nowiki>
Line 43: Line 43:
 
|[[Elizabeth II of the United Kingdom]]
 
|[[Elizabeth II of the United Kingdom]]
 
|{{hid|E}}[[Elizabeth II of the United Kingdom]]
 
|{{hid|E}}[[Elizabeth II of the United Kingdom]]
|-
 
 
|}
 
|}
  

Revision as of 16:48, 13 July 2020

Use

This template hides a string of text. If the contents of a cell of a sortable table are prefixed with a hidden string, the cell will sort using the hidden string.

The syntax for this template is:

{{hid|var1}}

where var1 is a string of text.

The use of this template is illustrated by the following sortable table:

House of Windsor
Wikitext Hidden prefix Sort without key Sort with key
{{hid|A}}[[Edward VII of the United Kingdom]] <span data-sort-value="A"></span> Edward VII of the United Kingdom Edward VII of the United Kingdom
{{hid|B}}[[George V of the United Kingdom]] <span data-sort-value="B"></span> George V of the United Kingdom George V of the United Kingdom
{{hid|C}}[[Edward VIII of the United Kingdom]] <span data-sort-value="C"></span> Edward VIII of the United Kingdom Edward VIII of the United Kingdom
{{hid|D}}[[George VI of the United Kingdom]] <span data-sort-value="D"></span> George VI of the United Kingdom George VI of the United Kingdom
{{hid|E}}[[Elizabeth II of the United Kingdom]] <span data-sort-value="E"></span> Elizabeth II of the United Kingdom Elizabeth II of the United Kingdom

See also

  • This template functions like Template:Hs, except this template returns an empty result if var1 is empty.