"साँचा:BookCat": अवतरणों में अंतर

Changing #default to a Wikijunior fall-through/main namespace match.
Changing to a test if talk page or not to permit use in other namespaces, should it be possible or desired.
पंक्ति १:
<includeonly>{{#ifeq:{{FULLPAGENAME}}|{{TALKPAGENAME}}||{{#switch:{{NAMESPACE}}|Template={{#ifeq:"{{FULLCHAPTERNAME}}"|"{{FULLBOOKNAME}}"|[[Category:{{BOOKNAME}}/Templates|{{{1| }}}]]|[[Category:{{BOOKNAME}}/Templates|{{{1|{{FULLCHAPTERNAME}}}}}]]}}|Category={{#ifeq:"{{FULLCHAPTERNAME}}"|"{{FULLBOOKNAME}}"||[[Category:{{#titleparts:{{PAGENAME}}|-1}}|{{#titleparts:{{PAGENAME}}||-1}}]]{{#ifeq:"{{FULLCHAPTERNAME}}"|"Templates"| [[Category:Book-specific templates|{{PAGENAME}}]]}}}}|Wikijunior| #default={{#ifeq:"{{FULLCHAPTERNAME}}"|"{{FULLBOOKNAME}}"|[[Category:{{FULLBOOKNAME}}|{{{1| }}}]]|[[Category:{{FULLBOOKNAME}}|{{{1|{{FULLCHAPTERNAME}}}}}]]}} }}}}</includeonly><noinclude>
This template does the following, based on the page it's added to:
*Places subpages of a book in the book's category (<tt>Category:{{tlx|FULLBOOKNAME}}</tt>) and sorts them by chapter name.