ਮਦਦ:ਸ਼੍ਰੇਣੀ - ਵਿਕੀਪੀਡੀਆ, ਇਕ ਅਜ਼ਾਦ ਵਿਸ਼ਵਗਿਆਨਕੋਸ਼
ਸਮੱਗਰੀ 'ਤੇ ਜਾਓ
ਵਿਕੀਪੀਡੀਆ, ਇੱਕ ਆਜ਼ਾਦ ਵਿਸ਼ਵਕੋਸ਼ ਤੋਂ
For guidelines on the use of categories in Wikipedia, see
Wikipedia:Categorization
. For a basic readers' guide see
Help:Categories
. For quick answers, see the
readers' FAQ
or the
editors' FAQ
on categories.
Shortcut
H:CAT
Wikipedia data structure
ਨੇਮਸਪੇਸਾਂ
ਨੇਮਸਪੇਸ ਵਿਸ਼ਾ
ਨੇਮਸਪੇਸ ਗੱਲਬਾਤ
(ਮੁੱਖ/ਲੇਖ)
ਗੱਲ-ਬਾਤ
ਵਰਤੋਂਕਾਰ
ਵਰਤੋਂਕਾਰ ਗੱਲ-ਬਾਤ
ਵਿਕੀਪੀਡੀਆ
ਵਿਕੀਪੀਡੀਆ ਗੱਲ-ਬਾਤ
ਤਸਵੀਰ
ਤਸਵੀਰ ਗੱਲ-ਬਾਤ
ਮੀਡੀਆਵਿਕੀ
ਮੀਡੀਆਵਿਕੀ ਗੱਲ-ਬਾਤ
10
ਫਰਮਾ
ਫਰਮਾ ਗੱਲ-ਬਾਤ
11
12
ਮਦਦ
ਮਦਦ ਗੱਲ-ਬਾਤ
13
14
ਸ਼੍ਰੇਣੀ
ਸ਼੍ਰੇਣੀ ਗੱਲ-ਬਾਤ
15
100
ਫਾਟਕ
ਫਾਟਕ ਗੱਲ-ਬਾਤ
101
118
[[ਵਿਕੀਪੀਡੀਆ:ਡਰਾਫਟ|]]
119
710
TimedText
TimedText talk
711
828
ਮੌਡਿਊਲ
ਮੌਡਿਊਲ ਗੱਲ-ਬਾਤ
829
Deprecated
2300
[[ਵਿਕੀਪੀਡੀਆ:ਗੈਜੇਟ|]]
2301
2302
[[ਵਿਕੀਪੀਡੀਆ:ਗੈਜੇਟ|]]
2303
ਇੰਸਟਾਲ ਨਹੀਂ ਕੀਤਾ
90
ਥਰਿੱਡ
ਥਰਿੱਡ ਗੱਲਬਾਤ
91
92
ਸੰਖੇਪ
ਸੰਖੇਪ ਗੱਲਬਾਤ
93
108
ਪੁਸਤਕਾਂ
Book ਗੱਲਬਾਤ
109
442
ਕੋਰਸ
Course ਗੱਲਬਾਤ
443
444
ਇੰਸਟੀਟਿਊਸ਼ਨ
ਇੰਸਟੀਟਿਊਸ਼ਨ ਗੱਲਬਾਤ
445
446
ਸਿੱਖਿਆ ਪ੍ਰੋਗਰਾਮ
ਸਿੱਖਿਆ ਪ੍ਰੋਗਰਾਮ ਗੱਲਬਾਤ
447
2600
ਵਿਸ਼ਾ
2601
ਬਣਾਵਟੀ ਨੇਮਸਪੇਸਾਂ
-1
ਖ਼ਾਸ
-2
ਮੀਡੀਆ
Current list (API call)
Categories
are intended to group together pages on similar subjects. They are implemented by a
MediaWiki
feature that adds any page with a text like
[[Category:
XYZ
]]
in its wikimarkup to the automated listing that is the category with name
XYZ
. Categories help readers to find, and navigate around, a subject area, to see pages sorted by title, and to thus find article relationships.
Categories are normally found at the bottom of an article page. Clicking a category name brings up a category page listing the articles (or other pages) that have been added to that particular category. There may also be a section listing the
subcategories
of that category. The subcategorization feature makes it possible to organize categories into tree-like structures to aid navigation.
The term
category
does refer to both the title of a category page—the
category pagename
—and the category itself. Keeping this in mind while reading about categorization, plus learning a category page layout is a worthwhile investment in research techniques. (See also the search box parameter "
incategory
".) The layout of a category page is mostly text, but see about
displaying category trees
below.
Summary
ਸੋਧੋ
The MediaWiki software maintains tables of
categories
, to which any editable page can be added. To add a page to a category, include "
[[Category:
Category name
]]
" or "
[[Category:
Category name
Sortkey
]]
" in that page's
wikimarkup
. The categories to which a page belongs appear in a box at the bottom of the page.
A category is usually associated with a
category page
in the "Category:"
namespace
A category page contains text that can be edited, like any other page, but when the page is displayed, the last part of what is displayed is an automatically generated list of all pages in that category, in the form of links. Other category pages which appear in this list are treated separately, as
subcategories
Putting pages in categories
ਸੋਧੋ
A page belongs to a category if the page's wikimarkup contains a declaration for that category. A category declaration takes the form
[[Category:
Category name
]]
or
[[Category:
Category name
Sortkey
]]
. The declaration must be processed, i.e. it will not work if it appears between
...
or
...
tags, or in a comment. The declaration may however come from a
transcluded
page; see
Categories and templates
below.
A category name can be any string that would be a legitimate
page title
. It cannot begin with a lower-case letter. If the category name given in a category declaration begins with a lower-case letter, then it is interpreted as if it were capitalized.
In Wikipedia, it is customary to place category declarations at the end of the wikimarkup, but before any
stub
templates (which themselves transclude categories) and
interlanguage links
When a page has been added to one or more categories, a categories box appears at the bottom of the page (or possibly elsewhere, if a non-default
skin
is being used). This box contains a list of the categories the page belongs to, in the order in which the category declarations appear in the processed wikimarkup. The category names are
linked
to the corresponding category pages. They appear as
redlinks
if the corresponding category page does not exist. If a user has enabled the
HotCat
gadget, the categories box will also provide links to quickly add, remove, or modify category declarations on the page, without having to edit the whole page.
Hidden categories are not displayed, except as described below under
Hiding categories
Category pages
ਸੋਧੋ
A "category page" is any page in the ਸ਼੍ਰੇਣੀ namespace. They each act as a category, and are termed a "category". The category page has one section titled
Subcategories
listing other "categories", and one section titled
Pages
, listing pages as categorized (in
other
namespaces). New categories are created by
creating a page
in the Category namespace.
A category page can be edited like any other page. However, when it is displayed, the editable part of the page is followed by automatically generated lists of pages belonging to the category, as follows:
First a count and list of subcategories (other category pages belonging to the category) is shown, if any exist. The name of each subcategory is followed by a count of its own subcategories. These further subcategories are expanded in the display if the
sign alongside the subcategory is clicked (but this "
widget
" is only visible if your browser has
JavaScript
enabled). Note:
is shown if there are no further subcategories. The subcategory is collapsed again if
is clicked.
Next a count and list of pages in the category (excluding subcategories and images) is shown. If the category has no members, a message to that effect is displayed.
Next a count and list of image and other media files in the category appears, if any exist. These are shown with thumbnails. The first 20 characters of the file name are shown, with an ellipsis if that is not the full name; also the file size is shown.
The items in the lists all link to the pages concerned; in the case of the images this applies both to the image itself and to the text below it (the name of the image).
For the way in which the lists are ordered, see
Sort order
below. The first and second lists are divided into sections, according to the first character of the sort key. These initial characters are displayed above the sections. To suppress these, make all sort keys start with a space.
A category page can only display a limited number of items (currently 200). If more pages belong to the category, there will be a link to the next ones.
The categories box for the category page appears at the bottom, in the same place as for other pages. This contains the categories to which the current category page has been added, i.e. its
parent categories
(the categories of which it is a subcategory). Add a category page to other categories in the normal way, using the "[[Category:
Category name
]]" or "[[Category:
Category name
Sortkey
]]" syntax.
Linking to category pages
ਸੋਧੋ
To link to a category page
without
putting the current page in that category, precede the link with a colon: [[:Category:
Category name
]]. Such a link can be
piped
like a normal wikilink. (The {{
cl
}} template, and others listed on its documentation page, may sometimes be helpful.)
Sort order
ਸੋਧੋ
By default, a page is sorted under the first letter of its full name
including the namespace
. Also, MediaWiki groups accented characters separately from their unaccented version, so pages starting by À, Á, Ä, will be listed under separate headings, instead of under heading A.
Unlike at
Special:Allpages
and
Special:Prefixindex
, a space is treated as a space (coming before all other characters), not as an underscore.
A page whose title begins with a number will be grouped
only
according to the first number. Thus "1 dog", "11 dogs", and "112 dogs" all appear under the "1" heading (not under "1", "10", and "100" headings). This will cause "112 dogs" to appear
before
"2 dogs" on the category page.
Each of the three lists (subcategories, pages, media files) is arranged in the order explained above (except that, in the subcategories list, the namespace indicator "Category:" is not considered). If an item ought to be positioned within a list on the basis of an alternative name (sort key) for that item, then this can be specified in the category tag that places the item in the list:
[[Category:
Category name
Sortkey
]]
For example to add an article called
Albert Einstein
to the category "People" and have the article sorted by "Einstein, Albert", you would type:
[[Category:People|Einstein, Albert]]
Unlike with a
piped link
(which uses the same syntax), the sort key itself is not displayed to readers. It affects only the order in which pages are listed on the category page.
It is useful to document the system being used for sort keys on the category page. For guidelines about the use of sort keys on Wikipedia, see
WP:SORTKEY
Default sort key
ਸੋਧੋ
ਇਹ ਵੀ ਦੇਖੋ:
WP:NAMESORT
ਅਤੇ
WP:SORTKEY
It is possible to set a default sort key which is different from
{{PAGENAME}}
by using the
magic word
{{DEFAULTSORT}}
thus:
{{DEFAULTSORT:new key}}
In the case of multiple default sort key tags, the last DEFAULTSORT on the final rendering of a page applies for all categories, regardless of the position of the category tags. This also means that a DEFAULTSORT tag included from a template is not effective if another DEFAULTSORT tag occurs later on the page, even if the later DEFAULTSORT tag is also "hidden" (included by another template).
Hiding categories
ਸੋਧੋ
When the
magic word
__HIDDENCAT__
is placed on a category page, that category becomes
hidden
, meaning that it will not be displayed on the pages belonging to that category. On Wikipedia, the magic word is not normally used explicitly, but is applied through the {{
hiddencat
}} template. The feature is mostly used to prevent project maintenance categories from showing up to ordinary readers on article pages.
However, hidden categories
are
displayed (although listed as hidden):
on category pages (whether as parent categories or subcategories);
at preview during editing;
if the user has selected "Show hidden categories" in user preferences.
Hidden categories are automatically added to
Category:Hidden categories
For guidelines on the hiding of categories on Wikipedia, see
WP:HIDDENCAT
Categories and templates
ਸੋਧੋ
A template can be used to add pages to a category, usually by placing the category link inside

tags on the template (e.g.
[[Category:category name]]
). When the template is transcluded into the page, the category link becomes active, and the page is added to the category page. This is useful for categories that have high turnover or many pages included, like cleanup categories.
Changes to the template, however, may not be reflected immediately on the category page. When you edit an article to add a category tag directly, the list of category members is updated immediately when the page is saved. When a category link is contained in a template, however, this does not happen immediately: instead, whenever a template is edited, all the pages that transclude it are put into the
job queue
to be recached during periods of low server load. This means that, in busy periods, it may take hours or even days before individual pages are recached and they start to appear in the category list. Performing a
null edit
to a page will allow it to jump the queue and be immediately recached.
To add the template itself to the category page as well, omit the "includeonly" tags. To add the template to a category
without
categorizing pages on which the template is transcluded, place the category declaration between ... tags, or add it to the
template documentation
page between

(the latter allows recategorizing the template without editing it, which is helpful if it is protected, or so complicated that mere mortals hesitate to touch it).
Parser functions
can be used to make the transcluded categories, or the sort key used in them, dependent on other variables, notably PAGENAME.
Passing a category by parameter
[[Category:{{{cat|default}}}]] or {{{cat|[[Category:default]]}}}
If the user provides a parameter 'cat=XXX' the page will be categorized at the page
[[Category:XXX]]
, otherwise it will be categorized at the page
[[Category:default]]
. Calling the template with "cat=" (equal to nothing) disables putting the page in any category.
Excluding non-article pages
{{#if:{{NAMESPACE}} | | [[Category:XXX]]}}
the variable NAMESPACE is null for mainspace articles. For any space other than mainspace, this ParserFunction will produce an empty string, but for regular articles this will include the article in Category:XXX.
On Wikipedia it is not recommended that templates be used to populate ordinary content categories of articles. See
Categorization using templates
in the categorization guideline.
Categorizing redirect pages
ਸੋਧੋ
Redirect pages can be categorized. The category tag must be placed after the redirect link. On a category page, redirects are listed in italics.
For conventions on the categorization of redirects in Wikipedia, see
Wikipedia:Categorizing redirects
Moving and redirecting category pages
ਸੋਧੋ
Categories can be moved
in the same way as an ordinary page; but a certain amount of cleanup may be necessary. A redirect is left at the old category name, and this is not a normal
#REDIRECT [[...]]
but a
{{
category redirect
}}
. Once all the pages have been moved out of the old category, it may be left as a category redirect, or deleted. For categories entirely populated through templates (see above), modifying the templates enables all affected articles to be moved to another category, but with the refresh problem mentioned. Almost all category name changes are made pursuant to a consensus decision at
Wikipedia:Categories for discussion
Do not create intercategory redirects other than with a
{{
category redirect
}}
template. See
Wikipedia:Categories for discussion#Redirecting categories
for more on category redirects.
Searching for articles in categories
ਸੋਧੋ
ਹੋਰ ਜਾਣਕਾਰੀ:
Help:Searching § Syntax
In addition to browsing through hierarchies of categories, it is possible to use the search tool to find specific articles in specific categories. To search for articles in a specific category, type
incategory:"
CategoryName
in the search box.
An "OR" can be added to join the contents of one category with the contents of another. For example, enter
incategory:"Suspension bridges" OR incategory:"Bridges in New York City"
to return all pages that belong to either (or both) of the categories, as
here
Note that using search to find categories will not find articles which have been categorized using templates. This feature also doesn't return pages in subcategories.
"Related Changes" with categories
ਸੋਧੋ
For a category, the "
Related Changes
" feature, applied to the corresponding category page, lists recent changes to the pages currently listed as belonging to that category. Where those pages are subcategories or image pages, only changes to their
editable parts
are listed.
Notice that "Related Changes" does
not
list recent changes to pages linked from the editable part of the category page (as it would normally, with a non-category page). (If a workaround is required for this, the links in question could be placed in a template and transcluded onto the category page.)
As usual (unlike with
watchlists
) recent changes to corresponding
talk pages
are
not
shown under "Related Changes". Pages you are watching are bolded on the list (this can be helpful for finding which pages in a given category you have on your watchlist).
"Related Changes" can be used to find pages which have recently been added to a category (unless they were added through modification of a template; then
"What links here"
should be used with the template). However it is not possible to detect deletions from a category in this way (since once pages have been removed from a category, their edits no longer show up in Related Changes). Another way of finding recent additions is to use an API query; see
Retrieving category information
below. There is
an external tool
to watch additions and removals from categories.
CategoryWatchlistBot
is another external tool to watch category membership changes.
The
DynamicPageList (third-party)
extension provides a list of
last
edits to the pages in a category, or optionally, just the list of pages; the simpler
DynamicPageList (Wikimedia)
is installed on Meta and Wikinews; the extension
mw:Extension:DPLforum
is installed on Wikia.
Listing all categories
ਸੋਧੋ
Special:Categories
provides an alphabetic list of all categories, with the number of members of each; this number does not include the content of the subcategories, but it includes the subcategories themselves, i.e., each counting as one.
The above list contains all categories that have members, regardless of whether they have corresponding category pages. To list all existing category pages (regardless of whether they have members), use
Special:AllPages/Category:
Displaying category trees and page counts
ਸੋਧੋ
As described at
mw:Help:Magic words
{{PAGESINCATEGORY:
Example
}}
or
{{PAGESINCAT:
Example
}}
returns the number of pages in "Category:Example". Each subcategory counts as one page; pages in subcategories are not counted.
The page
Special:CategoryTree
enables you to see the tree structure of a category (its subcategories, their subcategories and so on; the display of files and other member pages is optional).
The
CategoryTree extension
can be used to display such a tree on any page. (This is sometimes done on the category page itself, if the category is split over multiple screens, to make all subcategories available on every screen.) The basic syntax is

Category name

to display just the subcategory tree, and

Category name

to display member pages as well.
Dapete's
category-visualizer
vCat
will render charts of the tree structure.
You may also use
Template:Category tree
or
Template:Category tree all
, instead.
Retrieving category information
ਸੋਧੋ
Raw information about the members of a category, their sortkeys and timestamps (time when last added to the category) can be obtained from the
API
, using a query of the form:
Category_name
&action=query&list=categorymembers&cmlimit=500&cmprop=title|sortkey|timestamp
Listings of up to 500 members are possible. If there are more members then the results will include text near the end like this:
cmcontinue=
"page|NNNN|TITLE"
/>
This can be added to the previous one, without quotation marks, for the next page of members:
...&cmcontinue=page|NNNN|TITLE
Category intersection, union, etc.
ਸੋਧੋ
ਇਹ ਵੀ ਦੇਖੋ:
§ Searching for articles in categories
See also
Wikipedia:Category intersection
See also
Wikimedia bug T3497 "Hierarchical category system is urgently needed"
See also
ਸੋਧੋ
Wikipedia:Quick cat index
MW:Help:Categories
{{
Category TOC
}}
Notes
ਸੋਧੋ
The category itself is permanently created as soon as it has been saved on to any page. Unless you create a
category page
, it will display as a red link. Unless you add another category to the category page, it will not be placed in the category tree. Category pages are created like any other page. Most commonly, editors click on the redlink in an article and create the category page that way.
Wikipedia help pages
Noticeboards
(?)
FAQs
(?)
Reference desks
(?)
The Missing Manual
(?)
Help hub
(?)
About Wikipedia
Principles
Wikipedia in brief
Policies and guidelines
What Wikipedia is not
Disclaimer
parental advice
Making requests
where to ask questions
contact Wikipedia directly
Who writes Wikipedia?
Why create an account?
Help for readers
FAQ
Books
Glossary
Mobile access
Other languages
Searching
Students
Viewing media
Contributing
to Wikipedia
A plain and simple overview
A primer for newcomers
Asking for help
Advice for young editors
Avoiding common mistakes
Etiquette
community expectations
Learning the ropes
Instructional material
Simplified Manual of Style
Simplified rule-set
"Ignore all rules"
"The rules are principles"
Style-tips
Tip of the day
Job Center
Your first article
article wizard
Vandalism
Getting started
Wikipedia intro
Wikipedia tutorial
The Wikipedia Adventure
Newcomers' training
Manual of Style intro
Graphics tutorials
Picture tutorial
Uploading intro
IRC
(live chat)
tutorial
Navigating intro
Policies intro
Referencing intro
Tables intro
Talk pages intro
VisualEditor user guide
How-to pages
and
information pages
Appealing blocks
Article deletion
Categories
Citations / references
Referencing for beginners
Citation Style 1
Cite errors
References and page numbers
Diff
Editing
toolbar
edit conflict
Email confirmation
Find sources
Files
Footnotes
Image deletion
Infoboxes
Linking
link color
Logging in
Merging
Namespaces
Page name
Redirect
Renaming pages
Passwords
Reverting
Talk pages
archiving
URL
User contributions
User page design center
Coding wiki markup
Wiki markup
cheatsheet
Barcharts
Calculations
Characters
Citation templates
Columns
HTML
Lists
Magic words
introduction
Music symbols
Sections
Sounds
Tables
introduction
Templates
documentation
messages
Transclusion
Visual files
Wiki tools
Directories
Abbreviations
Departments
Editor's index
Essays
FAQs
Glossary
Guidelines
Help menu
Manual of Style
Policies
Shortcuts
Tips
Visit the
Teahouse
if you are a new editor looking for interactive help, or the
Help desk
for an interactive
Q & A
forum
Ask for help on your talk page
Wikipedia technical help
Get personal technical help at
the Teahouse
Help desk
Village pump (technical)
talk pages
or
IRC
General technical
help
Multilingual support
Special Characters
Entering
Browser notes
Troubleshooting
Bypass cache
Mobile access
Printing
Keyboard shortcuts
Editing
Edit toolbar
CharInsert
Edit conflict
VisualEditor
User guide
Create a page
Page history
Reverting
Page name
Introduction
User access levels
Editnotice
IRC
Tutorial
Special page
related
Special page help
Searching
Advanced search
Logging in
Reset passwords
Notifications/Echo
FAQ
Moving a page
Fix cut-and-paste moves
Watching pages
User contributions
Emailing users
Random pages
Logs
What links here
Related changes
Recent changes
Pending changes
Page Curation
Linksearch
Page import
Edit filter
Wiki markup
Wiki markup main page
Cheatsheet
Colours use
Columns
Line-break handling
Lists
Magic words
For beginners
Conditional expressions
Switch parser function
Time function
Redirects
Sections and TOCs
Tables
Introduction
Conditional tables
Sorting
Collapsing
Advanced table formatting
Links
and
diffs
URLs
Links
Permanent link
Interwikimedia links
Interlanguage links
Link color
Pipe trick
Colon trick
Magic links
Diffs
Simplest diff guide
Simple diff and link guide
Complete diff and link guide
Media files: images,
videos and sounds
Media help
Options to hide an image
Uploading images
Introduction
Files
Creation and usage
Moving to the Commons
Visual file markup
Images
Preparing images for upload
Picture tutorial
Extended image syntax
Gallery tag
Graphics tutorials
Basic bitmap image editing
How to improve image quality
Graphics Lab resources
Sound file markup
SVG help
Other graphics
Family trees
Graphs and charts
How to create
To scale charts
Barcharts
Math formula
Math symbols
Rendering math
LaTeX symbols
Musical scores
Musical symbols
Timeline
EasyTimeline syntax
WikiHiero syntax
Templates
and
Lua
modules
Templates
Template messages
Citation templates
Transclusion
Labeled section
Substitution
Advanced template coding
Template limits
Template sandbox and test cases
Template documentation
Purge
Lua project
Lua help
To do
Requests
Resources
Guide to Scribbling
Namespaces
Main/Article
Talk namespaces
Archiving
User
User page design
Project/Wikipedia
File
MediaWiki
Bug reports and feature requests
Template
Help
Category
Portal
Book
Draft
Education Program
TimedText
Module/Lua
Topic/Flow
Special
Media
HTML
and
CSS
HTML in wikitext
Markup validation
Span tags
Cascading Style Sheets
Catalogue of CSS classes
Useful styles
Classes used in microformats
Ambox classes
Common.js and common.css
Customisation
and tools
Preferences
Skins
Customizing watchlists
Hide pages
Gadgets
Beta Features
User scripts
Guide
Techniques
IRC Scripts
User styles
Tools
Navigation shortcuts
Browser tools
Alternative browsing
Editing tools
Optimum tool set
Cleaning up vandalism tools
Citation tools
Wikimedia Labs
Toolserver
Automating editing
Bots
Creating
Twinkle
FurMe
NPWatcher
HotCat
WPCleaner
igloo
AutoWikiBrowser
Navigation popups
STiki
AfC helper script
Huggle
" ਤੋਂ ਲਿਆ
ਸ਼੍ਰੇਣੀਆਂ
Pages using deprecated source tags
Pages using deprecated enclose attributes
ਗਲਤ ਰੱਖਿਆ ਫਰਮਿਆਂ ਵਾਲੇ ਸਫੇ
Wikipedia pages with incorrect protection templates
Wikipedia categorization
Wikipedia how-to
Wikipedia page help
ਮਦਦ
ਸ਼੍ਰੇਣੀ
ਵਿਸ਼ਾ ਜੋੜੋ