Difference between revisions of "Template:Book"
Jump to navigation
Jump to search
(15 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
Please type the following instruction to fill in the reference of a book: | |||
<nowiki> | <nowiki>{{Author=Author(s) separated by ,|Name= Book Name|Publisher=Name of publisher|Year=Year of publication|Edition=Edition|Page=Number of Pages}}</nowiki> | ||
{{ | When certain parameters are absent, they will be automatically omitted. The syntax for doing so can be shown as follows: | ||
| | <nowiki>{{#if:{{{Edition</nowiki><font color=red>|</font><nowiki>}}}|{{{Edition}}} Edition,|}}{{{Publisher}}}</nowiki> | ||
| | Please note the <nowiki>"pipe"</nowiki> symbol (<font color=red>|</font>) after the parameter name: '''Edition'''<font color=red>|</font>, it is needed to enabled the <code><nowiki>#if</nowiki></code> statement to work. | ||
| | |||
| | |||
</ | |||
</nowiki> | |||
</noinclude> | </noinclude> | ||
<includeonly> | <includeonly> | ||
{{ | {{{Author}}}, | ||
{ | {{{Name}}}, | ||
{{#if:{{{Edition|}}}|{{{Edition}}} Edition,|}}{{{Publisher}}}, | |||
{{{Year}}}, | |||
{{#if:{{{Page|}}}|Number of Pages:{{{Page}}}| }} | |||
| | |||
|} | |||
</includeonly> | </includeonly> |
Latest revision as of 17:41, 27 June 2021
Please type the following instruction to fill in the reference of a book:
{{Author=Author(s) separated by ,|Name= Book Name|Publisher=Name of publisher|Year=Year of publication|Edition=Edition|Page=Number of Pages}}
When certain parameters are absent, they will be automatically omitted. The syntax for doing so can be shown as follows:
{{#if:{{{Edition|}}}|{{{Edition}}} Edition,|}}{{{Publisher}}}
Please note the "pipe" symbol (|) after the parameter name: Edition|, it is needed to enabled the #if
statement to work.