Difference between revisions of "Template:Infobox User/gender"

From Twinsuniverse
Jump to: navigation, search
(Created page with "<includeonly> {{#switch: {{lc:{{{1|}}}}} | hide = {{categorizer|category=Hidden gender users|label=''hidden''|display=infobox|nocat={{{nocat|false}}}}} | male = {{categorizer|...")
 
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
{{#switch: {{lc:{{{1|}}}}}
+
{{gender: {{PAGENAME}}
| hide = {{categorizer|category=Hidden gender users|label=''hidden''|display=infobox|nocat={{{nocat|false}}}}}
+
| {{categorizer|category=Male users|label=Male|display=infobox|nocat={{{nocat|false}}}}}
| male = {{categorizer|category=Male users|label=Male|display=infobox|nocat={{{nocat|false}}}}}
+
| {{categorizer|category=Female users|label=Female|display=infobox|nocat={{{nocat|false}}}}}
| female = {{categorizer|category=Female users|label=Female|display=infobox|nocat={{{nocat|false}}}}}
+
| {{categorizer|category=Undisclosed gender users|label=''undisclosed''|display=infobox|nocat={{{nocat|false}}}}}
| {{maintenance task|nocat={{{nocat|false}}}
+
    |category=Users of unknown gender
+
    |doclink=Infobox User/gender
+
    |label=''unknown''
+
    |reason=The '''gender''' parameter specifies {{#if:{{{1|}}}|'{{lc:{{{1|}}}}}' (unknown)| no value}} }}
+
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
This template offers a multiple choice for defining the gender category of your userpage. It can also automatically categorize the page under that category.
+
This template automatically defines the gender category of your userpage. It can also automatically categorize the page under that category.
  
 
==Parameters==
 
==Parameters==
# The selected gender from the following values (no parameter name and values are case insensitive):
 
#* ''male''
 
#* ''female''
 
#* ''hide''
 
#* any other (non)empty value defaults to: ''unknown''
 
 
* '''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:''' If you wish not to expose your gender, use the "hide" value.''
+
'''''Note:''' Your gender will be determined according to your [[Special:Preferences|user preference setting]].''
  
 
==Syntax==
 
==Syntax==
  <nowiki>{{Infobox User/gender|value}}</nowiki>
+
To use, this template does not require any parameter.
 +
  <nowiki>{{Infobox User/gender}}</nowiki>
  
 
==Examples==
 
==Examples==
Any of the above values may be used like this:
+
Depending on your chosen setting, the result would be either:
<nowiki>{{Infobox User/gender|male}}</nowiki>
+
<nowiki>{{Infobox User/gender|female}}</nowiki>
+
 
+
 
:{{categorizer|category=Male users|label=Male|nocat=true}}
 
:{{categorizer|category=Male users|label=Male|nocat=true}}
 
:{{categorizer|category=Female users|label=Female|nocat=true}}
 
:{{categorizer|category=Female users|label=Female|nocat=true}}
  
  
The case of the value is not important:
+
If you didn't disclose your gender, the result would be:
<nowiki>{{Infobox User/gender|feMALE}}</nowiki>
+
:{{categorizer|category=Undisclosed gender users|label=''undisclosed''|nocat=true}}
 
+
:{{categorizer|category=Female users|label=Female|nocat=true}}
+
 
+
 
+
If you don't want to expose your gender, you could specify "hide", like this:
+
<nowiki>{{Infobox User/gender|hide}}</nowiki>
+
 
+
:{{categorizer|category=Hidden gender users|label=''hidden''|nocat=true}}
+
 
+
 
+
You may also leave your "gender" undefined (which would raise the [[:Category:Users of unknown gender|Users of unknown gender]] maintenance task) by not specifying any valid value, so these all have the same result:
+
<nowiki>{{Infobox User/gender}}</nowiki>
+
<nowiki>{{Infobox User/gender|}}</nowiki>
+
<nowiki>{{Infobox User/gender|both}}</nowiki>
+
<nowiki>{{Infobox User/gender|uncle}}</nowiki>
+
<nowiki>{{Infobox User/gender|yellow}}</nowiki>
+
 
+
:{{categorizer|category=Users of unknown gender|label=''unknown''|nocat=true}}
+
  
  
 
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|male|nocat=true}}</nowiki>
+
  <nowiki>{{Infobox User/gender|nocat=true}}</nowiki>
  
This would render the same result as the first example above, but would not automatically categorize under [[:Category:Male users]]. This feature works both on valid values and the maintenance task mentioned above.
+
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.
  
 
[[Category:Categorizers|user]]
 
[[Category:Categorizers|user]]
 
</noinclude>
 
</noinclude>

Revision as of 19:08, 2 January 2013

This template automatically defines the gender category of your userpage. It can also automatically categorize the page under that category.

Parameters

  • nocat: Whether or not to suppress categorization under the chosen category (defaults to false, which means auto categorization).


Note: Your gender will be determined according to your user preference setting.

Syntax

To use, this template does not require any parameter.

{{Infobox User/gender}}

Examples

Depending on your chosen setting, the result would be either:

Male [list all]
Female [list all]


If you didn't disclose your 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|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.