Template:Category search by

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Search by month
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Search by
file type file extension
image JPEG PNG TIFF GIF WEBP XCF
DRAWING SVG
OFFICE PDF DjVu
AUDIO OGG (OGX, OGA, OPUS) WAV MPEG (MP3) FLAC MIDI WEBM
VIDEO WEBM OGG (OGX, OGV)
3D SLA
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Category search by/doc.

Provides links to search under a category (if parameter mode is set to incategory) or category tree (default setting, utilising deepcategory). Function realised in subtemplates:

You can also directly use them.

The simplest transclusion {{Category search by}} displays both Template:Category search by/month and Template:Category search by/filetype by default. You can also selectively hide them by setting #Template parameters.

Template:Category search by/month makes use of regex search (insource:/[0-9]{4}-01/ for January). This can only find file pages with for example "2022-01" in wikitext.

Template:Category search by/filetype might not be complete, depending on the list of options available: mw:Help:CirrusSearch#filetype. Extension options follow descending order of the number of files according to Special:MediaStatistics.

A horizontal version https://commons.wikimedia.org/w/index.php?diff=989785883 was also tested but not made into a subtemplate because it doesnt appear useful, especially for mobile users.

Credit: Inspired by https://commons.wikimedia.org/w/index.php?diff=739121445 .

Usage

{{Category search by |1= |month= |filetype= }}

Template parameters

ParameterDescriptionDefaultStatus
1
mode
modemode of search: incategory if set to in, incat, or incategory; otherwise, default to deepcategory)emptyoptional
monthmonthhide subtemplate "search by month" if set to 0, n, or no.emptyoptional
filetypefiletypehide subtemplate "search by filetype" if set to 0, n, or no.emptyoptional

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: all users

See also