Jump to content

Template:Subject: Difference between revisions

From IdeaWazaWiki
wikademia>Darklama
categories books in up to 10 categories
 
wikademia>Wikademia
m 22 revisions
 
(21 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<noinclude>
<includeonly>
This template categorizes a book in up to 10 categories.
{{#ifeq:{{#switch:{{#titleparts:{{FULLPAGENAME}}|0}}|{{BOOKNAME}}|{{NAMESPACE}}:{{#titleparts:{{PAGENAME}}|0}} = yes|#default = no}}|yes|
{{#if:{{NAMESPACE}}||[[Category:{{{bookcategory|{{BOOKNAME}}}}}]]}}
{{#if:{{{1|}}}|[[Category:{{{1}}}|{{FULLCHAPTERNAME}}]]|[[Category:Uncategorized modules|{{FULLCHAPTERNAME}}]]}}
{{#if:{{{2|}}}|[[Category:{{{2}}}|{{FULLCHAPTERNAME}}]]}}{{#if:{{{3|}}}|[[Category:{{{3}}}|{{FULLCHAPTERNAME}}]]}}
{{#if:{{{4|}}}|[[Category:{{{4}}}|{{FULLCHAPTERNAME}}]]}}{{#if:{{{5|}}}|[[Category:{{{5}}}|{{FULLCHAPTERNAME}}]]}}
{{#if:{{{6|}}}|[[Category:{{{6}}}|{{FULLCHAPTERNAME}}]]}}{{#if:{{{7|}}}|[[Category:{{{7}}}|{{FULLCHAPTERNAME}}]]}}
{{#if:{{{8|}}}|[[Category:{{{8}}}|{{FULLCHAPTERNAME}}]]}}{{#if:{{{9|}}}|[[Category:{{{9}}}|{{FULLCHAPTERNAME}}]]}}
{{#if:{{{10|}}}|[[Category:{{{10}}}|{{FULLCHAPTERNAME}}]]}}|[[Category:{{BOOKNAME}}|{{FULLCHAPTERNAME}}]]}}
</includeonly><noinclude>


;Example: {{tlx|{{PAGENAME}}|Math|Science|Computing|Programming|etc}}
This template categorizes a book in up to 10 categories, plus the book category (this is automatic). The book category can be modified by setting the <code>bookcategory</code> variable
</noinclude><includeonly>
<pre>{{Subject|Math|Science|Computing|Programming|etc}}
[[Category:{{{1}}}|{{BOOKNAME}}]]
{{Subject|bookcategory=book (book)|Math|Science|etc}}</pre>
{{#ifeq:{{{2|+}}}|{{{2|-}}}|[[Category:{{{2}}}|{{BOOKNAME}}]]}}
[[Category:Catalogue templates]]
{{#ifeq:{{{3|+}}}|{{{2|-}}}|[[Category:{{{2}}}|{{BOOKNAME}}]]}}
</noinclude>
{{#ifeq:{{{4|+}}}|{{{2|-}}}|[[Category:{{{2}}}|{{BOOKNAME}}]]}}
{{#ifeq:{{{5|+}}}|{{{2|-}}}|[[Category:{{{2}}}|{{BOOKNAME}}]]}}
{{#ifeq:{{{6|+}}}|{{{2|-}}}|[[Category:{{{2}}}|{{BOOKNAME}}]]}}
{{#ifeq:{{{7|+}}}|{{{2|-}}}|[[Category:{{{2}}}|{{BOOKNAME}}]]}}
{{#ifeq:{{{8|+}}}|{{{2|-}}}|[[Category:{{{2}}}|{{BOOKNAME}}]]}}
{{#ifeq:{{{9|+}}}|{{{2|-}}}|[[Category:{{{2}}}|{{BOOKNAME}}]]}}
{{#ifeq:{{{10|+}}}|{{{2|-}}}|[[Category:{{{2}}}|{{BOOKNAME}}]]}}</includeonly>

Latest revision as of 00:33, 29 April 2009


This template categorizes a book in up to 10 categories, plus the book category (this is automatic). The book category can be modified by setting the bookcategory variable

{{Subject|Math|Science|Computing|Programming|etc}}
{{Subject|bookcategory=book (book)|Math|Science|etc}}