Difference between revisions of "Template:Book"

From PKC
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:


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</nowiki><font color=red>|</font><nowiki>}}}|{{{Edition}}} Edition,|}}{{{Publisher}}}</nowiki>
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.
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.
</noinclude>
</noinclude>



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.