සැකිල්ල:Shelves/doc

Wikibooks වෙතින්
Jump to navigation Jump to search

This template categorizes a book on one or more shelves in the Shelf:, plus the book category.

Usage[සංස්කරණය]

Use this template only on the book's main page. Specify the names of the shelves as unnamed parameters, such as {{shelves|mathematics|science|etc}}.

For non-shelf categories, such as descendants of Category:Books by type, use template {{categories}}.

On subpages of a book, use {{BookCat}}.

Internals[සංස්කරණය]

This template is responsible for adding books to the hidden allbooks categories, which allow automatic generation of lists of books belonging either to a given shelf or to any of its sub-shelves. When this template detects that it is being used on the main page of a book, for each shelf specified it calls {{shelves/leaf}}, via Module:TScope#map. This is why this template should only be used for shelf categories: {{shelves/leaf}} uses shelf pages to figure out which allbooks categories to add the book to, and if there are no shelf pages to consult, it reports the problem to ප්‍රවර්ගය:පොත:Shelf:/Attention needed. By using {{categories}} for non-subject categories, one avoids nuisance reports to ප්‍රවර්ගය:පොත:Shelf:/Attention needed.

The book is also added to hidden ප්‍රවර්ගය:පොත:Shelf:/Books; and, if no shelves are specified, to ප්‍රවර්ගය:පොත:Shelf:/Books/Unshelved.

If the template detects that it was called on a page that isn't the main page of a book, it does nothing.

This template can be induced to display diagnostic messages, explaining why it has put the page in ප්‍රවර්ගය:පොත:Shelf:/Attention needed, by specifying parameter diagnose=true.

See also[සංස්කරණය]

  • {{categories}} — adds book to non-subject categories
  • {{alphabetical}} — adds book to alphabetical classification
  • {{status}} — classifies book by completion status
  • {{BOOKNAME}} — Returns the name of the book including the namespace
"https://si.wikibooks.org/w/index.php?title=සැකිල්ල:Shelves/doc&oldid=12451" වෙතින් සම්ප්‍රවේශනය කෙරිණි