Template:BookLink

Revision as of 21:56, 24 October 2010 by MikeMol (talk | contribs) (Usage and demonstration. Also some guidelines.)

This is a template. There are many others. See Category:RCTemplates for a complete list of templates.

Purpose

The use of this template is preferred to direct linking to book resources, as purchases made through the generated link earn Rosetta Code a bit of money through the Amazon Associates program. This will help.

When Not to Use

  1. When a link to a specific book resource would be decidedly inappropriate or unhelpful. It's unhelpful to have a huge number of links, both in terms of choice of appropriate resources, as well as in terms of quality.

How to use

By correct selection of the template parameter (the ISBN number, dashes removed, is ideal, followed by ASIN or [[wp:ESIN|ESIN.), a referral link will be provided to the desired resource, hyperlinked as the title and author's name.

For example, Donald Knuth's The Art of Computer Programming has the ISBN-10 of 0201853922. To create a referral link to this resource, you may use this syntax:

{{BookLink|0201853922}}

This will appear as: <amazon keywords="0201853922">[%url% %title%] by %author%</amazon>

The box set, volumes 1-4A has the ISBN-10 of 0321751043. To create a referral link to this resource, you may use this syntax:

{{BookLink|0321751043}}

This will appear as: <amazon keywords="0321751043">[%url% %title%] by %author%</amazon>