Template:Search inside category
Produces a search box (using InputBox) to enable users to search inside the category's contents (including the layers of subcategories) using keywords.
The template automatically sets the following categories: Category:Categories with deepcategory search box (or a subcategory thereof if searchtype parameter is set)
Usage
{{Search inside category |1= |namespaces= |searchtype= }}
Do NOT add this template to a category where the search results show the error Deep category query returned too many categories. Only a subset of categories has been applied. or to categories where the results contain a large fraction of offtopic files due to an unfixed miscategorization.
A problem is that the deepcategory operator used here does not work in many categories, especially categories with many subcategories – this problem is tracked in the code issue linked on the right and discussed here.See related wish in the Community Wishlist: W464: Search box in Commons categories of media files
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | Custom name | Optionally define the category to be searched. Defaults to the current page. | {{PAGENAME}} | optional |
namespaces | Namespace search filter | Filter search results by namespace. Defaults to file namespace. | File** | optional |
searchtype | search tab | The opened MediaSearch tab – 'image', 'video', 'audio', 'page' (default), or 'other' | image | optional |
Additional information
The template is intended to be used in the following namespaces: the Category namespace
The template is intended to be used by the following user groups: no user group specified
Relies on:
mw:Extension:InputBox
See also
Template:Search box inside category – template this template was forked from but using the incategory operator instead of the deepcategory operator and therefore only searches files directly in the category rather than also files in its subcategories, making is useless in most cases
Localization
To add your language to the list of languages supported by this template, please edit the template and add a row to the "{{LangSwitch|}}" construct. It takes the form "|xx= Your translation " (xx being the code of your language)