Template:Wb/lad/Subjects

[edit] [history] [purge] Template documentation

Lua error in package.lua at line 80: module 'Module:Wb/lad/Category handler/config' not found. This template categorizes a book in up to 10 subject categories, plus the book category (this is automatic). The book category can be modified by setting the bookcategory variable. You can also use this on subpages of a book and it will only add the book category; however, {{Wb/lad/BookCat}} is recommended for subpages.

For non-subject categories (typically, descendants of Category:Wb/lad/Books by type), use template {{Wb/lad/categories}} instead of this template.

Usage

edit

{{Wb/lad/subjects|mathematics|science|etc}}
{{Wb/lad/subjects|bookcategory={{FULLBOOKNAME}} (book)|mathematics|science|etc}}

Internals

edit

This template is responsible for adding books to the hidden allbooks categories, which allow automatic generation of lists of books belonging to a given subject or any of its sub-subjects. When this template detects that it is being used on the main page of a book, for each subject specified it calls {{Wb/lad/subjects/leaf}}. This is why this template should only be used for subject categories: {{Wb/lad/subjects/leaf}} uses subject pages to figure out which allbooks categories to add the book to, and if there are no subject pages to consult, it reports the problem to Category:Wb/lad/Attention needed (allbooks). By using {{Wb/lad/categories}} for non-subject categories, one avoids nuisance reports to Category:Wb/lad/Attention needed (allbooks).

See also

edit