Wikipedia:WikiProject Cycling/Templates
From Wikipedia, the free encyclopedia
This page is part of the WikiProject Cycling and is intended to be used as a guide on template standardization.
Contents |
[edit] Navigational boxes (navboxes)
This is a system for allowing all navigational boxes (templates) related to cycling to be placed on any page without having to have them as separate boxes. Standard colours for header rows, standard listing methods and other standardizations have been introduced to make these boxes look good when combining several different pieces.
[edit] Templates used
The standardization scheme consists of four templates:
- {{cycling box start}} or {{cb start}}
- {{cycling box end}} or {{cb end}}
- {{cycling box inner start}} or {{cb inner start}}
- {{cycling box inner end}} or {{cb inner end}}
The latter of the variants are redirects but are easier to remember and to type, and works just as well.
Previously-existing, stand-alone navboxes need minor modification to work with the scheme.
[edit] How to determine if a navbox is standardized
When you want to include a navbox on a page, first you must determine whether the navbox is one of our standardized templates. There may be text at the template page saying so, but if there is not, test the template by adding it to an article by itself (i.e., not between enclosing {{cb start}} and {{cb inner end}}), and preview.
- If adding the template produces strange results, the template is standardized.
- If the template appears in the article as it should, the template is not standardized.
That is, a standardized navbox does not work correctly unless it is between enclosing {{cb start}} and {{cb end}} templates.
[edit] If the navbox is standardized
If the navbox you intend to include in an article is already standardized, the only thing you need to do to include it in the article is to type in:
{{cb start}}
{{Cycling template}}
{{cb end}}
(Replacing {{Cycling template}}
with the navbox you intend to use.) If there already are {{cb start}} and {{cb end}} tags included in the article, just place {{Cycling template}}
somewhere in between them, there is no need for double sets of tags:
{{cb start}}
{{Cycling template}}
{{Another cycling template}}
{{cb end}}
[edit] If the navbox is not standardized
If the navbox you intend to include in an article is not standardized, a few modifications to the navbox are necessary if you want to use it with the {{cb start}} and {{cb end}} tags. In case you are a lazy Wikipedian, just add the template the regular way without modifying anything, but in case you are a good Wikipedian, do the following:
- Open up and edit the navbox page.
- Add the following at the absolute top of the navbox:
<noinclude>{{cb start}}</noinclude>
This ensures that the template page of the navbox shows how the navbox looks when used instead of showing the code. - Add the following under the previous code:
|-
!style="background:#ccf;"|{{Tnavbar-header|[[Navbox header]]|Template Name|bgcolor=#ccf}}
This produces the header of the navbox, with the standard colour, which may be changed when making for example team navboxes, but otherwise this colour (light blue) should be used for most templates. It also includes small links to template, template talk and edit template. The [[Navbox header]] should of course be modified to fit the purpose of the navbox you are creating/standardizing, but Template Name must be the exact name used after Template: in the title. - Add the following under the previous code:
{{cb inner start}}
This is a short piece of code that allows all kinds of navbox configurations to be displayed between the same {{cb start}} and {{cb end}} tags. - Next add the contents of the navbox. When creating/standardizing a navbox listing things, the standard code is:
|- style="text-align:center;"
|
<!-- NBSPs prevent wrapping-->
[[First item|First item]] |
[[Second item|Second item]] |
...
[[Last item|Last item]]
When creating/standardizing a navbox with tables, the standard code is:
|- style="text-align:center;"
|width="xx%"|[[1st row, 1st col]]
|width="xx%"|...
|width="xx%"|[[1st row, Last col]]
|- style="text-align:center;"
|[[2nd row, 1st col]]
|...
|[[2nd row, Last col]]
And so on. - Add the following under the previous code:
{{cb inner end}}<noinclude>
{{cb end}}
{{using cb}}</noinclude>
The first tag is the ending of the earlier {{cb inner start}}, the second tag is the ending of the earlier {{cb start}} and the last tag adds a short explanation on how to use the template and also adds it in this category.
This should work on all navboxes that only contain one header and one type of formatting (listing or tables, not both). If the navbox is more complicated than that, you may either fiddle around a little yourself if you are confident in that you understand the use of the templates, or contact someone that can help you, preferably by asking on this page's talk page.
[edit] Information boxes (infoboxes)
Code | Where to use |
---|---|
{{Infobox Cycling team}} | Articles about professional or otherwise notable teams |
{{Infobox Cycling race}} |
Main-page cycling race articles (not separate races) |
{{Infobox Cycling race report}} |
Articles about specific cycling race events |
{{Infobox Cyclist}} | Biographies of cyclists and managerial staff, past and present |
{{Infobox Hill climb}} | Articles about climbs used by cyclists or in cycle racing |
[edit] Team templates
[edit] Teams
For squad lists in team articles, use the following templates:
- {{Cycling squad start}}
- {{Cycling squad rider}}
- {{Cycling squad mid}}
- {{Cycling squad end}}
For instructions on how to use these templates, see Template talk:Cycling squad rider
[edit] Players
For many professional teams, there are navboxes for the squad that can be inserted at the foot of a rider's biography. See Category:Cycling team templates for a full list.
To create a new squad template (having first checked there isn't one already) use the following templates:
- {{Cycling team}}
- {{Cycling team rider}}
- {{Cycling team manager2}}
For instructions on how to use these templates, see Template:Cycling team
[edit] Timesavers
- {{flagiconUCI}} gives
- For external link sections
- {{cyclingwebsite}} gives WikiProject Cycling/Templates profile at the Cycling Website
- {{trapfriis}} gives Palmarès at Trap-Friis.dk
- {{official}} gives Official site
[edit] Stub templates
Code | What it makes | What it's for | ||
---|---|---|---|---|
{{cycling-stub}} | Miscellaneous cycling-related articles | |||
{{cycling-bio-stub}} |
|
Cycling biographical articles | ||
{{cycling-org-stub}} | Cycling organisation articles | |||
{{cycling-race-stub}} | Cycling race articles |
[edit] Project templates
Code | What it makes | What it's for | ||
---|---|---|---|---|
{{cycling project}} | The project notice, designed to be placed in the talk page of any article that has been edited as part of this WikiProject. This is the primary method of recruiting new members for the WikiProject. | |||
{{WikiProject Cycling}} | The userbox banner for project members to place on their user pages. Automatically categorizes you into Category:WikiProject Cycling members. If you want a smaller notice, use {{User WikiProject Cycling}} instead. | |||
{{User WikiProject Cycling}} |
|
The standard format userbox for WikiProject Cycling. Add to your user page instead of {{WikiProject Cycling}} if you want a smaller notice. Automatically categorizes you into Category:WikiProject Cycling members. |
[edit] Welcome and greeting templates
Code | Where to use |
---|---|
{{subst:CyclingWelcome-anon}} | A welcome template to paste on the user talk page of someone who anonymously edits an article in WikiProject Cycling. |
{{subst:CyclingWelcome}} | A welcome template to paste on the user talk page of someone who edits an article in WikiProject Cycling, is not already a WikiProject Cycling member, and has created an account. |
{{subst:CyclingGreeting-new}} | A greeting template to paste on the user talk page of a new - but already welcomed - editor who contributed to an article in WikiProject Cycling, who is not already a WikiProject Cycling member. |
{{subst:CyclingGreeting-exp}} | A greeting template to paste on the user talk page of an experienced editor who contributed to an article in WikiProject Cycling, who is not already a WikiProject Cycling member. |
[edit] General Cycling Userboxes
{{User:UBX/Cycling}} |
|
||
{{User:UBX/Bicyclist}} |
|
||
{{User:Holek/Userboxes/bicycling}} |
|
||
{{User:UBX/cyclist}} |
|
[edit] Templates from similar WikiProjects
Code | What it makes | What it's for | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{Olympic Games Cycling}} |
|
A navigation footer for articles about cycling in the Olympic games. Part of Wikipedia:WikiProject Olympics. |