Difference between revisions of "Template:Infobox User/gender"
J McKalling (Talk | contribs) (Created page with "<includeonly> {{#switch: {{lc:{{{1|}}}}} | hide = {{categorizer|category=Hidden gender users|label=''hidden''|display=infobox|nocat={{{nocat|false}}}}} | male = {{categorizer|...") |
J McKalling (Talk | contribs) (added infobox) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
− | {{#switch: {{ | + | {{#switch: {{gender: {{{1|NONexisting}}} |male|female|undisclosed}} |
− | | | + | | male = {{categorizer|category=Male users|label=Male|nocat={{{nocat|false}}}}} |
− | | | + | | female = {{categorizer|category=Female users|label=Female|nocat={{{nocat|false}}}}} |
− | | | + | | #default = {{categorizer|category=Undisclosed gender users|label=''undisclosed''|nocat={{{nocat|false}}}}} |
− | + | }}</includeonly><noinclude>{{Infobox Template | |
− | + | |purpose=infobox | |
− | + | |singletag=no | |
− | + | |multiline=no | |
− | + | |gamerelated=yes | |
− | }} | + | |suppressible=recursively |
− | This template | + | |choice=none |
+ | |cat1=Male users!''male'' | ||
+ | |cat2=Female users!''female'' | ||
+ | |cat3=Undisclosed gender users!''undisclosed'' | ||
+ | |var1= | ||
+ | }} | ||
+ | |||
+ | This template automatically defines the gender category of a userpage. It can also automatically categorize the page under that category. | ||
==Parameters== | ==Parameters== | ||
− | # The | + | # The username to automatically check the gender of (no parameter name, case sensitive) |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
* '''nocat''': Whether or not to suppress categorization under the chosen category (defaults to false, which means auto categorization). | * '''nocat''': Whether or not to suppress categorization under the chosen category (defaults to false, which means auto categorization). | ||
− | '''''Note:''' | + | '''''Note:''' The gender will be determined according to the user's [[Special:Preferences|preference setting]].'' |
==Syntax== | ==Syntax== | ||
− | <nowiki>{{Infobox User/gender| | + | To use, this template only requires a username. |
+ | <nowiki>{{Infobox User/gender|username}}</nowiki> | ||
==Examples== | ==Examples== | ||
− | + | Depending on the chosen setting of the specified user, the result would be either: | |
− | <nowiki>{{Infobox User/gender| | + | <nowiki>{{Infobox User/gender|{{PAGENAME}}}}</nowiki> |
− | + | ||
:{{categorizer|category=Male users|label=Male|nocat=true}} | :{{categorizer|category=Male users|label=Male|nocat=true}} | ||
Line 35: | Line 38: | ||
− | + | If the user didn't disclose their gender, the result would be: | |
− | + | :{{categorizer|category=Undisclosed gender users|label=''undisclosed''|nocat=true}} | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | :{{categorizer|category= | + | |
The '''nocat''' parameter may be used to suppress automatic categorization like this (any value will do): | The '''nocat''' parameter may be used to suppress automatic categorization like this (any value will do): | ||
− | <nowiki>{{Infobox User/gender| | + | <nowiki>{{Infobox User/gender|{{PAGENAME}}|nocat=true}}</nowiki> |
− | This would render the same result as | + | This would render the same result as usual, but would not automatically categorize under the respective category. This feature works both on the specified and undisclosed settings. |
− | |||
</noinclude> | </noinclude> |
Latest revision as of 22:09, 5 June 2014
Infobox User/gender | |
---|---|
Purpose |
Infobox [list all] |
Single tag |
No [list all] |
Multi-line |
No [list all] |
Protected |
No [list all] |
Game related |
Yes [list all] |
Categorization | |
Suppressible |
Recursively [list all] |
Choice |
No choice [list all] |
Categories |
Multiple: [list all] |
Variables | |
Names |
none [list all] |
Subpages |
This template automatically defines the gender category of a userpage. It can also automatically categorize the page under that category.
Parameters
- The username to automatically check the gender of (no parameter name, case sensitive)
- nocat: Whether or not to suppress categorization under the chosen category (defaults to false, which means auto categorization).
Note: The gender will be determined according to the user's preference setting.
Syntax
To use, this template only requires a username.
{{Infobox User/gender|username}}
Examples
Depending on the chosen setting of the specified user, the result would be either:
{{Infobox User/gender|{{PAGENAME}}}}
If the user didn't disclose their gender, the result would be:
- undisclosed [list all]
The nocat parameter may be used to suppress automatic categorization like this (any value will do):
{{Infobox User/gender|{{PAGENAME}}|nocat=true}}
This would render the same result as usual, but would not automatically categorize under the respective category. This feature works both on the specified and undisclosed settings.