Template:Search box
This template may be used to add an input box to let the user search a set of pages, for example archived Talk pages.
Usage
{{search box
|root =
|search-break =
|search-width =
|search-button-label =
}}
Template parameters
Parameter | Description | Default | Status | |
---|---|---|---|---|
root | root page | Prefix to search pages starting with. For example, if its value is “User talk:Example/Archives”, the template will search in pages starting with User talk:Example/Archives. | {{FULLPAGENAME}} | optional |
nosuffix | omit slash suffix | If this parameter is present (either with any value or as blank), there will be no slash appended to the root page title. | empty | optional |
search-break | line break | Whether to insert a line break between the search field and the button; “yes” or “no”. | no | optional |
search-width | width | Width of the search field in characters (bare number without any unit) | 22 | optional |
search-button-label | button label | The text of the search button | Search | optional |
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard. Existing template documentation Newly created template documentation and imports Wikipedia's help about TemplateData • Commons-specific information This template may be used to add an input box to let the user search a set of pages, for example archived Talk pages.
|
Additional information
The template is intended to be used in the following namespaces: all talk namespaces and noticeboards
The template is intended to be used by the following user groups: all users
Placement: At the top of the page
See also
- mw:Extension:InputBox – documentation of {{#tag:inputbox|...}}
- en:Template:archive box – English Wikipedia template that inspired this one
- mw:Help talk:Parser functions in templates#parameter specified or not for discussion on correctness of Help page example used in this template
Examples
{{search box |root= User:84user |search-break=no |search-width=22 |search-button-label=Search User:84user with suffix }}
produces
{{search box |root= User:84user |nosuffix |search-break=no |search-width=22 |search-button-label=Search User:84user with nosuffix ignored }}
produces
{{search box |root= User:84user |search-break=no |search-width=22 |search-button-label=Search User:84user with suffix }}
produces
{{search box |root= User:84user |nosuffix= |search-break=no |search-width=22 |search-button-label=Search User:84user with no suffix }}
produces
{{search box |root= User:84user |nosuffix=anything |search-break=no |search-width=22 |search-button-label=Search User:84user with no suffix=anything }}
produces
Wrap the template call in a table to workaround the formatting (see source for details):