Difference between revisions of "Template:MWsportnameYYYYOlyCat/doc"

From blackwiki
Jump to navigation Jump to search
imported>BrownHairedGirl
(add)
imported>BrownHairedGirl
Line 16: Line 16:
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:Winter Olympics category header templates]]
 
[[Category:Winter Olympics category header templates]]
 +
[[Category:Summer Olympics category header templates]]
 
}}</includeonly>
 
}}</includeonly>

Revision as of 21:02, 10 November 2018

To create a category of the form "[Women's/Men's] sportname at the YYYY [Summer/Winter] Olympics", e.g. Category:Men's alpine skiing at the 2018 Winter Olympics or Category:Women's short track speed skating at the 2002 Winter Olympics.

It produces header text, including navboxes, and parent categories.

Usage

{{MWsportnameYYYYOlyCat}}

The category takes no parameters. Instead it parses the category title to find the sex, sport, year and games.

The logic used to do so may not perfect. If it produces odd results, a diagnostic mode displays how the title was parsed:

{{MWsportnameYYYYOlyCat|diagnostics=yes}}