Template:ISBN
This template uses Lua: |
Usage[edit]
Use this template to create a link (or list of links) to Special:BookSources for one or more International Standard Book Numbers with the usual "ISBN" prefix. The template supports 10- and 13-digit ISBNs (with or without hyphens).
{{ISBN|0-7475-3269-9}}
results in:
And:
{{ISBN|978-1-4133-0454-1}}
results in:
The idea is to switch from "magic link" syntax to more explicit syntax.
If more than one ISBN is given, the template will separate them using a comma:
{{ISBN|978-1-4133-0454-1|978-1-4133-0454-1|978-1-4133-0454-1}}
results in:
ISBN 978-1-4133-0454-1, 978-1-4133-0454-1, 978-1-4133-0454-1
Alternatively the conjugation between the last two list items can be defined using the leadout= parameter:
{{ISBN|978-1-4133-0454-1|978-1-4133-0454-1|978-1-4133-0454-1|leadout=and}}
results in:
ISBN 978-1-4133-0454-1, 978-1-4133-0454-1 and 978-1-4133-0454-1
It the leading "ISBN" link should not occur (for example in longer lists), it can be suppressed using the plainlink=yes parameter:
{{ISBN|978-1-4133-0454-1|978-1-4133-0454-1|978-1-4133-0454-1|plainlink=yes}}
results in:
978-1-4133-0454-1, 978-1-4133-0454-1, 978-1-4133-0454-1
(Alternatively the {{ISBNT}} template can be used.)
The plainlink and leadout parameter can be used at the same time:
{{ISBN|978-1-4133-0454-1|978-1-4133-0454-1|978-1-4133-0454-1|plainlink=yes|leadout=as well as}}
results in:
978-1-4133-0454-1, 978-1-4133-0454-1 as well as 978-1-4133-0454-1
Error checking[edit]
This template uses Module:Check isxn to validate the ISBN. If the ISBN is not valid, this subtemplate will still generate the link, and it will add the article to Category:Pages with ISBN errors.
Since invalid ISBNs are sometimes used in publications, it is possible to disable the validity check for individual ISBNs given as parameters. In order to do so, add invalid?=yes (with ? replaced by the parameter number 1 to 9) to the template. In this case, the article will be added to Category:Pages with listed invalid ISBNs.
- {{ISBN|1-4133-0451-0}} produces ISBN 1-4133-0451-0 Parameter error in {{isbn}}: Invalid ISBN.
- {{ISBN|1-4133-0451-0|invalid1=yes}} produces ISBN 1-4133-0451-0
- {{ISBN|1-4133-0451-0|invalid1=no}} produces ISBN 1-4133-0451-0 Parameter error in {{isbn}}: Invalid ISBN.
- {{ISBN}} produces Parameter error in {{isbn}}: Missing ISBN.
See also[edit]
- {{PMID}}
- {{Catalog lookup link}}