Jump to content

Template:Subjects: Difference between revisions

From Wikibooks, open books for an open world
[unreviewed revision][checked revision]
Content deleted Content added
+check for whether template was added to main book page or not.
BOOKNAME (new-style)
 
(30 intermediate revisions by 10 users not shown)
Line 1: Line 1:
<includeonly>{{#ifeq:{{BOOKPAGENAME}}||<!-- this isn't a subpage -->
<noinclude>
{{#switch:{{NAMESPACE}}|Wikijunior|=[[{{BOOKCATEGORY|book={{{bookcategory|{{NAIVEBOOKNAME}}}}}}}| ]]}}
This template categorizes a book in up to 10 categories.
{{#if:{{{1|}}}|{{Subjects/leaf|{{{1}}}|bookcategory={{{bookcategory|{{NAIVEBOOKNAME}}}}}|diagnose={{{diagnose|}}}}}|[[Category:Uncategorized books|{{BOOKSORTKEY}}]]}}

{{#if:{{{2|}}}|{{Subjects/leaf|{{{2}}}|bookcategory={{{bookcategory|{{NAIVEBOOKNAME}}}}}|diagnose={{{diagnose|}}}}}}}
;Example: {{tlx|{{PAGENAME}}|Math|Science|Computing|Programming|etc}}</noinclude><includeonly>
{{#if:{{{3|}}}|{{Subjects/leaf|{{{3}}}|bookcategory={{{bookcategory|{{NAIVEBOOKNAME}}}}}|diagnose={{{diagnose|}}}}}}}
{{#ifeq:{{PAGENAME}}|{{BOOKNAME}}|[[Category:{{BOOKNAME}}| ]] [[Category:{{{1}}}|{{BOOKNAME}}]]
{{#if:{{{2|}}}|[[Category:{{{2}}}|{{BOOKNAME}}]]}}{{#if:{{{3|}}}|[[Category:{{{3}}}|{{BOOKNAME}}]]}}
{{#if:{{{4|}}}|{{Subjects/leaf|{{{4}}}|bookcategory={{{bookcategory|{{NAIVEBOOKNAME}}}}}|diagnose={{{diagnose|}}}}}}}
{{#if:{{{4|}}}|[[Category:{{{4}}}|{{BOOKNAME}}]]}}{{#if:{{{5|}}}|[[Category:{{{5}}}|{{BOOKNAME}}]]}}
{{#if:{{{5|}}}|{{Subjects/leaf|{{{5}}}|bookcategory={{{bookcategory|{{NAIVEBOOKNAME}}}}}|diagnose={{{diagnose|}}}}}}}
{{#if:{{{6|}}}|[[Category:{{{6}}}|{{BOOKNAME}}]]}}{{#if:{{{7|}}}|[[Category:{{{7}}}|{{BOOKNAME}}]]}}
{{#if:{{{6|}}}|{{Subjects/leaf|{{{6}}}|bookcategory={{{bookcategory|{{NAIVEBOOKNAME}}}}}|diagnose={{{diagnose|}}}}}}}
{{#if:{{{8|}}}|[[Category:{{{8}}}|{{BOOKNAME}}]]}}{{#if:{{{9|}}}|[[Category:{{{9}}}|{{BOOKNAME}}]]}}
{{#if:{{{7|}}}|{{Subjects/leaf|{{{7}}}|bookcategory={{{bookcategory|{{NAIVEBOOKNAME}}}}}|diagnose={{{diagnose|}}}}}}}
{{#if:{{{10|}}}|[[Category:{{{10}}}|{{BOOKNAME}}]]}}|[[Category:{{BOOKNAME}}|{{SUBPAGENAME}}]]}}</includeonly>
{{#if:{{{8|}}}|{{Subjects/leaf|{{{8}}}|bookcategory={{{bookcategory|{{NAIVEBOOKNAME}}}}}|diagnose={{{diagnose|}}}}}}}
{{#if:{{{9|}}}|{{Subjects/leaf|{{{9}}}|bookcategory={{{bookcategory|{{NAIVEBOOKNAME}}}}}|diagnose={{{diagnose|}}}}}}}
{{#if:{{{10|}}}|{{Subjects/leaf|{{{10}}}|bookcategory={{{bookcategory|{{NAIVEBOOKNAME}}}}}|diagnose={{{diagnose|}}}}}}}|<!-- this is a subpage -->
{{#switch:{{NAMESPACE}}|Wikijunior|=[[{{BOOKCATEGORY|{{{bookcategory|{{BOOKNAME}}}}}}}|{{BOOKSORTKEY}}]]|#default=
{{#if:{{{1|}}}|[[Category:{{{1}}}|{{BOOKSORTKEY}}]]|[[Category:Uncategorized books|{{BOOKSORTKEY}}]]}}
{{#if:{{{2|}}}|[[Category:{{{2}}}|{{BOOKSORTKEY}}]]}}
{{#if:{{{3|}}}|[[Category:{{{3}}}|{{BOOKSORTKEY}}]]}}
{{#if:{{{4|}}}|[[Category:{{{4}}}|{{BOOKSORTKEY}}]]}}
{{#if:{{{5|}}}|[[Category:{{{5}}}|{{BOOKSORTKEY}}]]}}
{{#if:{{{6|}}}|[[Category:{{{6}}}|{{BOOKSORTKEY}}]]}}
{{#if:{{{7|}}}|[[Category:{{{7}}}|{{BOOKSORTKEY}}]]}}
{{#if:{{{8|}}}|[[Category:{{{8}}}|{{BOOKSORTKEY}}]]}}
{{#if:{{{9|}}}|[[Category:{{{9}}}|{{BOOKSORTKEY}}]]}}
{{#if:{{{10|}}}|[[Category:{{{10}}}|{{BOOKSORTKEY}}]]}}}}}}
{{#if:{{{bookcategory|}}}|[[Category:Books that specify subjects bookcategory]]}}
</includeonly><noinclude>{{documentation}}</noinclude>

Latest revision as of 03:10, 24 January 2018