This page has been transcluded from Template:Control selector/Documentation.
This template is used to give the user a choice of which controls to display on a page. It is used either:
- once on a page at the top, just beneath the {{Header Nav}}, or
- in the Table of Contents of a guide, just beneath the {{Header Nav}} and in a <includeonly> section.
Parameters and usage
{{control selector|comma-separated list of consoles|(Optional)float=left/none}}
- The first parameter of this template is passed as a comma-separated list of consoles which are then listed in a drop-down box on the page. When a page is loaded or a console in the list is selected, all of the content specific to that console (hidden inside an instance of {{Control}}) becomes visible. For example, the first console listed in this template will display all of the content in the first parameter of all the {{Control}} templates on the page; while the second console in the list will display all of the content in the second parameter of all the {{Control}} templates on the page, and so on. Note that what is listed in the first parameter should be a list of console names (e.g. "GameCube, PlayStation 2, Xbox, PC"), rather than controllers (e.g. "GameCube controller, DualShock 2, Xbox controller, Keyboard").
- The template floats to the right by default. An optional named parameter, float, can be added after the console list to float the selector to the left or to suppress floating (with float=none).
Examples
{{Control selector|PlayStation 2/PlayStation 3, Xbox 360, Wii, PC}} This is an example bit of text where you should press {{control|{{psx|X}}|{{xbox|A}}|{{wii|A}}|{{kbd|Space}}}}.
This is an example bit of text where you should press .
Floating
{{Control selector|PlayStation 2/PlayStation 3, Xbox 360, Wii, PC|float=left}}
Note: if a second control selector is added to a page, it will not display the drop down box; no page should have more than one.
This template is used to give the user a choice of which controls to display on a page. It is used either once on a page at the top, just beneath the Header Nav template, or in the Table of Contents of a guide, just beneath the Header Nav template and in a <includeonly> section.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Comma-Separated Consoles | control selector | Values listed in a drop-down box on the page. When a page is loaded or a console in the list is selected, all of the content specific to that console (hidden inside an instance of the Control template) becomes visible.
| Line | required |
float | float | The template floats to the right by default. You can use this parameter to change it to float to the left or to suppress floating.
| Line | optional |