Template:User gender
Jump to navigation
Jump to search
-
- The following documentation is located at Template:User gender/documentation. [edit]
- Useful links: subpage list • links • redirects • transclusions • errors (parser/module) • sandbox
Usage
When included on a user or user talk page, it returns the gender of that user as set in their preferences. It returns m
if set to male, f
if set to female, and -
if not set. It also returns -
when included on a page that is not a user page.
The template has an optional first parameter which merely exists for convenience. If not empty, the template simply returns that parameter instead of retrieving the setting from the preference. This way, any templates that need the gender but allow it to be overridden can simply use {{User gender|
(without a first parameter, the equivalent would be: {{{g|}}}
}}{{#if:
which is longer).
{{{g|}}}
|{{{g}}}
|{{User gender}}
}}