https://kumu.tru.ca/index.php?title=Template:BookCat&feed=atom&action=historyTemplate:BookCat - Revision history2024-03-29T08:33:59ZRevision history for this page on the wikiMediaWiki 1.35.8https://kumu.tru.ca/index.php?title=Template:BookCat&diff=327&oldid=prevWikiadmin: 1 revision2013-10-24T22:00:36Z<p>1 revision</p>
<p><b>New page</b></p><div><includeonly>{{#ifeq:{{FULLPAGENAME}}|{{TALKPAGENAME}}||{{#switch:{{NAMESPACE}}|Template={{#ifeq:{{{template-filing|}}}|deep|[[Category:{{BOOKNAME}}/Templates{{#if:{{#titleparts:{{PAGENAME}}||3}}|/{{#titleparts:{{PAGENAME}}|-1|2}}}}|{{{1|{{#if:{{CHAPTERNAME}}|{{#titleparts:{{PAGENAME}}||-1}}}}}}} ]]|[[Category:{{BOOKNAME}}/Templates|{{{1|{{#titleparts:{{FULLPAGENAME}}||2}}}}} ]]}}|Category={{#ifeq:{{FULLCHAPTERNAME}}|{{FULLBOOKNAME}}||[[Category:{{#titleparts:{{PAGENAME}}|-1}}|{{{1|{{#titleparts:{{PAGENAME}}||-1}}}}} ]]{{#ifeq:{{FULLCHAPTERNAME}}|Templates| [[Category:Book-specific templates|{{{1|{{PAGENAME}}}}} ]]}}}}|#default={{#ifeq:{{{filing|}}}|deep|[[Category:{{#if:{{CHAPTERNAME}}|{{#titleparts:{{FULLPAGENAME}}|-1}}|{{FULLPAGENAME}}}}|{{{1|{{#if:{{CHAPTERNAME}}|{{#titleparts:{{PAGENAME}}||-1}}}}}}} ]]|[[Category:{{FULLBOOKNAME}}|{{{1|{{#titleparts:{{FULLPAGENAME}}||2}}}}} ]]}}}}}}</includeonly><noinclude><br />
This template puts the page on which it's used (<code><nowiki>{{FULLPAGENAME}}</nowiki></code>) into appropriate categories, based on certain page-naming and page-categorization conventions.<br />
<br />
When used without parameters, it<br />
*places subpages of a book in the book's category ({{nowrap|<code>Category:{{tlx|ROOTBOOKNAME}}</code>}}) and sorts them by chapter name.<br />
*places a book's templates in the book's template category ({{nowrap|<code>Category:{{tlx|ROOTBOOKNAME}}/Templates</code>}}). ''This only works if a book's templates begin with''&nbsp; {{nowrap|<code>Template:{{tlx|ROOTBOOKNAME}}</code>}}&nbsp;.<br />
*places a book's template category in the book's category and in&nbsp; {{nowrap|<code>[[:Category:Book-specific templates]]</code>}}&nbsp;.<br />
*places any other category in its parent, sorted by the category's last name. The parent has the same name except removing everything from the last slash on; and the last name is the part that was removed after that last slash. For example, {{nowrap|<code>Category:My Book/Images</code>}}&nbsp; would go in&nbsp; {{nowrap|<code>Category:My Book</code>}}&nbsp; with sort key&nbsp; <code>Images</code>&nbsp;.<br />
<br />
Optional parameter&nbsp; {{nowrap|<code><nowiki>filing=deep</nowiki></code>}}&nbsp; changes the behavior on book pages, so that a book page with more than one slash in its name is placed in a subcategory of the category where its parent page would be placed, sorted by the page's last name. For example, using&nbsp; {{nowrap|<code><nowiki>{{BookCat|filing=deep}}</nowiki></code>}}&nbsp; on page&nbsp; {{nowrap|<code>My Book/Maps/Asia</code>}}&nbsp; would put that page in&nbsp; {{nowrap|<code>Category:My Book/Maps</code>}}&nbsp; with sort key&nbsp; <code>Asia</code>&nbsp;.<br />
<br />
Optional parameter&nbsp; {{nowrap|<code><nowiki>template-filing=deep</nowiki></code>}}&nbsp; changes the behavior on template pages to deep filing (so&nbsp; {{nowrap|<code>Template:My book/Maps/Asia</code>}}&nbsp; would go in&nbsp; {{nowrap|<code>Category:My book/Templates/Maps</code>}}).<br />
<br />
See [[Using Wikibooks/Subjects, Categories, and Classifications#Deep filing (advanced)]] for more information.<br />
<br />
[[Category:Catalogue templates|{{PAGENAME}}]]</noinclude></div>Wikiadmin