Difference between revisions of "Template:People-section"

From Worms Knowledge Base

Jump to: navigation, search
m
(add new parameter for customising the sort key)
 
(6 intermediate revisions by the same user not shown)
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="{{{1}}}">'''{{{1}}}'''</span>&nbsp;<!--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>&nbsp;<!--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>&nbsp;<!--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>&nbsp;<!--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-->
|style="border-width: 1px 0;"|&nbsp;<!--WWP-->
+
|style="border-width: 1px 0;"| &nbsp;<!--WWP-->
|style="border-left-width: 0; text-align: right;"|&#91;[[#top|top]]&#93;</onlyinclude>
+
|style="border-left-width: 0; text-align: right;"|{{#if:{{{subpage|}}}|&#91;[[{{{subpage}}}|view]]&#93; &#91;[[Talk:{{{subpage}}}|talk]]&#93; &#91;<span class="plainlinks">[{{fullurl:{{{subpage}}}|action=edit}} <span title="Edit section: {{{1}}}">edit</span>]</span>&#93;}} &#91;[[#top|top]]&#93;</onlyinclude>
 
|}
 
|}
 
----
 
----
;Usage
+
==Usage==
:<code><nowiki>{{People-section|letter}}</nowiki></code>
+
<code><nowiki>{{People-section|name|sortkey=sortkey|subpage=subpage name}}</nowiki></code>
;Example
+
 
:<code><nowiki>{{People-section|B}}</nowiki></code>
+
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==
 +
<code><nowiki>{{People-section|B}}</nowiki></code>
 +
{| width="100%" border="1" cellpadding="2" cellspacing="0"
 +
{{People-section|B}}
 +
|}
 +
<code><nowiki>{{People-section|B|subpage=People (B)}}</nowiki></code>
 +
{| width="100%" border="1" cellpadding="2" cellspacing="0"
 +
{{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]
Personal tools