July 20, 2006
Cdml Asin

CdmlAsin provides an automatic Amazon affiliate image link. You can use such links to get a percentage of the book sales of Amazon customers which used these links when buying the books.


Default element:

created by:



CdmlAsin is implemented on top of CdmlLink, therefore all parameters of CdmlLink can be used.

CdmlAsin parameters:

  • body: The body of the CdmlAsin element is taken as the ISBN or ASIN number.
  • title: The optional title parameter provides an additional description text for the link. It is only visible when the user hovers with the mouse over the link.
These parameters exist but are typically not used because the are created automatically from the defaults. The description here is for completeness only:

  • aid: the affiliation id
  • url: the URL which is linked to
  • image: the URL of the image shown


The configuration of the defaults is done by using the CdmlElementDefaults mechanism.

You define:

  • the url pattern where you link to
    • e. g. [image={code}.01.THUMBZZZ.jpg]
  • the image that is to be shown and
    • e. g. [url={code}/{aid}]
  • the affiliate id (aid)
    • e. g. [aid=rickcogleyweb-20]
Combined default definitions:

  • cdml.asin.defaults=[aid=rickcogleyweb-20][image={code}.01.THUMBZZZ.jpg][url={code}/{aid}]
These defaults are also defined in the script so currently you only need to define the aid parameter. But the Amazon url parameter structure may change and then it is probably easier for the maintainer if these parameters are already in place to be changed.

Note: the insertion marker {code} is replaced by the given ISDN or ASIN code, the insertion marker {aid} is replaced by the affiliation id.

Location: typically the TopConfiguration, where it affects all wiki pages.

For an example configuration in place (working only for this page) see /Context.

More examples

This example uses an ASIN number and defines a title "Life is Beautiful" that shows when you hover with the mouse over the image:

create by:

[[ASIN]B00001U0DP[title=Life is Beautiful]]

Discussion / starting with the original text from FeatureRequests