This template adds the current page (presumed to be the main page of a book) to a specified subject category, and tries to add it to the allbooks categories of that subject and all that subject's ancestors.

There are two parameters, one required and non-blank, the other optional.

Only addition to the named subject, श्रेणी:{{{1}}}, is done within this template; population of allbooks categories is delegated to {{Subjects/0}}.

This template is also responsible for populating श्रेणी:पुस्तकें जहाँ पुस्तक का नाम विषय का नाम भी है.