Difference between revisions of "Template:People-section"

From Worms Knowledge Base

Jump to: navigation, search
m
(add new parameter for customising the sort key)
 
Line 1: Line 1:
 
{| width="100%" border="1" cellpadding="2" cellspacing="0"
 
{| width="100%" border="1" cellpadding="2" cellspacing="0"
 
<onlyinclude>|- style="background-color: #ccdeff;"
 
<onlyinclude>|- style="background-color: #ccdeff;"
|style="border-right-width: 0; text-align: center;"| <span id="{{anchorencode:{{{1|}}}}}">'''{{{1}}}'''</span><!--Nickname-->
+
|style="border-right-width: 0; text-align: center;"| {{#if:{{{sortkey|}}}|<span style="display: none;">{{{sortkey}}}!</span>}}<span id="{{anchorencode:{{{1|}}}}}">'''{{{1}}}'''</span><!--Nickname-->
|style="border-width: 1px 0;"| <span style="display: none;">{{{1}}}</span><!--Clan-->
+
|style="border-width: 1px 0;"| <span style="display: none;">{{{sortkey|{{{1}}}}}}</span><!--Clan-->
|style="border-width: 1px 0;"| <span style="display: none;">{{{1}}}</span><!--Location-->
+
|style="border-width: 1px 0;"| <span style="display: none;">{{{sortkey|{{{1}}}}}}</span><!--Location-->
|style="border-width: 1px 0;"| <span style="display: none;">{{{1}}}</span><!--First Name-->
+
|style="border-width: 1px 0;"| <span style="display: none;">{{{sortkey|{{{1}}}}}}</span><!--First Name-->
 
|style="border-width: 1px 0;"| &nbsp;<!--W2-->
 
|style="border-width: 1px 0;"| &nbsp;<!--W2-->
 
|style="border-width: 1px 0;"| &nbsp;<!--WA-->
 
|style="border-width: 1px 0;"| &nbsp;<!--WA-->
Line 11: Line 11:
 
|}
 
|}
 
----
 
----
===Usage===
+
==Usage==
<code><nowiki>{{People-section|letter|subpage=subpage name}}</nowiki></code>
+
<code><nowiki>{{People-section|name|sortkey=sortkey|subpage=subpage name}}</nowiki></code>
  
The subpage parameter is optional.
+
Parameters
 +
*'''1''': (required) The section name, usually a letter like "A" or "B".
 +
*'''sortkey''': (optional) Specify the sort key here if it is different from the section name.
 +
*'''subpage''': (optional) A subpage name where the section links.
  
===Examples===
+
==Examples==
 
<code><nowiki>{{People-section|B}}</nowiki></code>
 
<code><nowiki>{{People-section|B}}</nowiki></code>
 
{| width="100%" border="1" cellpadding="2" cellspacing="0"
 
{| width="100%" border="1" cellpadding="2" cellspacing="0"
Line 24: Line 27:
 
{| width="100%" border="1" cellpadding="2" cellspacing="0"
 
{| width="100%" border="1" cellpadding="2" cellspacing="0"
 
{{People-section|B|subpage=People (B)}}
 
{{People-section|B|subpage=People (B)}}
 +
|}
 +
<code><nowiki>{{People-section|0–9|sortkey=0}}</nowiki></code>
 +
{| width="100%" border="1" cellpadding="2" cellspacing="0"
 +
{{People-section|0–9|sortkey=0}}
 
|}
 
|}

Latest revision as of 00:18, 25 April 2010

{{{1}}} {{{1}}} {{{1}}} {{{1}}}       [top]

Usage

{{People-section|name|sortkey=sortkey|subpage=subpage name}}

Parameters

  • 1: (required) The section name, usually a letter like "A" or "B".
  • sortkey: (optional) Specify the sort key here if it is different from the section name.
  • subpage: (optional) A subpage name where the section links.

Examples

{{People-section|B}}

B B B B       [top]

{{People-section|B|subpage=People (B)}}

B B B B       [view] [talk] [edit] [top]

{{People-section|0–9|sortkey=0}}

0!0–9 0 0 0       [top]