الگو:شابک۲/توضیحات
این زیرصفحهٔ مستندات الگو:شابک۲ است. این شامل اطلاعات استفاده، الگوها، پیوندهای بین زبانی و سایر اطلاعات است که در اصل الگو صفحه قرار نمیگیرد. |
این الگو از لوآ استفاده میکند: |
استفاده[ویرایش]
{{شابک۲|0-7475-3269-9}}
خروجی:
و:
{{شابک۲|978-1-4133-0454-1}}
خروجی:
The idea is to switch from "magic link" syntax to more explicit syntax. This March 2017 (English Wikipedia) RfC determined the magic link should be replaced by this template.
If more than one ISBN is given, the template will separate them using a comma:
{{شابک۲|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:
{{شابک۲|978-1-4133-0454-1|978-1-4133-0454-1|978-1-4133-0454-1|leadout=and}}
خروجی:
It the leading "ISBN" link should not occur (for example in longer lists), it can be suppressed using the plainlink=yes parameter:
{{شابک۲|978-1-4133-0454-1|978-1-4133-0454-1|978-1-4133-0454-1|plainlink=yes}}
خروجی:
(Alternatively the {{ISBNT}} template can be used.)
The plainlink and leadout parameter can be used at the same time:
{{شابک۲|978-1-4133-0454-1|978-1-4133-0454-1|978-1-4133-0454-1|plainlink=yes|leadout=as well as}}
خروجی:
Formatting[ویرایش]
The template preserves the formatting of the input values, for example:
{{شابک۲|978-1-4133-0454-1|978141330454-1|978 1-41330-454-1}}
خروجی:
Error checking[ویرایش]
This template uses پودمان: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 رده:صفحهها با خطای شابک.
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.
- {{شابک۲|1-4133-0451-0}} خروجی شابک ۱−۴۱۳۳−۰۴۵۱−۰
- {{شابک۲|1-4133-0451-0|invalid1=yes}} خروجی شابک ۱−۴۱۳۳−۰۴۵۱−۰
- {{شابک۲|1-4133-0451-0|invalid1=no}} خروجی شابک ۱−۴۱۳۳−۰۴۵۱−۰