Difference between revisions of "Template:Book"
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
When certain parameters are absent, they will be automatically omitted. The syntax for doing so can be shown as follows: | When certain parameters are absent, they will be automatically omitted. The syntax for doing so can be shown as follows: | ||
<nowiki>{{#if:{{{Edition|}}}|{{{Edition}}} Edition,|}}{{{Publisher}}}</nowiki> | <nowiki>{{#if:{{{Edition|}}}|{{{Edition}}} Edition,|}}{{{Publisher}}}</nowiki> | ||
Please note the <nowiki>"pipe" symbol (|)</nowiki> after the parameter name: '''Edition'''<font color=red>|</font>, it is needed to enabled the <code><nowiki>#if</nowiki></code> statement to work. | Please note the <nowiki>"pipe" symbol (<font color=red>|</font>)</nowiki> after the parameter name: '''Edition'''<font color=red>|</font>, it is needed to enabled the <code><nowiki>#if</nowiki></code> statement to work. | ||
</noinclude> | </noinclude> | ||
Revision as of 17:39, 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 (<font color=red>|</font>) after the parameter name: Edition|, it is needed to enabled the #if
statement to work.