User:TedSwippet/Sandbox2

{{#if: {{#ifeq: {{NAMESPACE}}| Special| {{Format ISBN|{{{MAGIC_NUMBER}}}|error=}}| TRUE}}| Below is a list of links to online text sites, sites that sell new and used books, and sites that review books. They may have further information about the book you are looking for. {{Affiliate links}} {{#if: {{{MAGIC_NUMBER}}} |

ISBN
}}

Online text

 * Google Books
 * Open Library (Open Library is a project of the non-profit Internet Archive.)

US

 * AddALL (AddALL is a book search and price comparison web site.)
 * Amazon US (Bogleheads.org is an Amazon Associate and may earn from qualifying purchases made through this link.)
 * Barnes & Noble
 * Book Depository

Canada

 * AbeBooks (AbeBooks is a Canadian book reseller. Verify the point of sale, as it may originate outside the US, resulting in a credit card foreign transaction fee for US residents.)
 * Amazon Canada

UK

 * Amazon UK
 * AwesomeBooks (This bookseller partners with the UK National Literacy Trust.)
 * Blackwell's
 * Foyles
 * Waterstones
 * World of Books (World of Books is a UK-based online used book seller.)

Other European countries

 * Amazon: Germany, Spain, France, Italy, Netherlands, Poland, Sweden

Other non-European countries

 * Amazon: United Arab Emirates, Australia, Brazil, China, India, Japan, Mexico, Saudi Arabia, Singapore, Turkey

Book review sites
}} {{documentation|content= This template generates the full content for Bogleheads:Book sources, transcluded by Special:BookSources. Using a template enables easier testing of the page content and layout, in particular from Special:ExpandTemplates.
 * Goodreads (Goodreads is an extensive book review web site.)
 * LibraryThing

Usage
Invoke from Bogleheads:Book sources with:

The single parameter MAGIC_NUMBER contains the MAGICNUMBER generated by Special:BookSources. The parameter name needs to be different to MAGICNUMBER to prevent MediaWiki converting the parameter name in the template invocation.

When transcluded from a page in Special namespace, this template will generate text only when MAGIC_NUMBER is a valid ISBN. For invalid ISBNs, it generates nothing. This is to prevent Special:BookSources from using Bogleheads:Book sources and offering external book site search links that will invariably fail for invalid ISBNs.

Example
Using generates: