Shopping Basket


 x 

Cart empty


Log In

Find Us Elsewhere

Forum Search

Keyword

We have introduced a new templating system for the Amazon Web Services plugin. There are two templates, both of which can be found in the plugin folder 'amazonWS/tmpl'

  • article.php controls the layout when viewing the full article
  • blog.php controls the layout when viewing the article in blog format

This behaviour can be changed by using the plugin 'show blog output' parameter. If set to 'no', the article.php layout will be used in all situations.

These templates can be edited directly to change the layout, alternatively you can use template overriding, which is the preferable way, because it makes it easier to update the plugin when future releases become available.

To do this, create a folder in your site template called 'html/amazonWS'. Then copy the contents of the plugin folder 'amazonWS/tmpl', ie the files article.php, blog.php (along with the index.html file which you do not need to edit). You can then edit these two files to arrange the layout as you wish. The following data are available in these files:-

  • $lists->link
  • $lists->nofollow
  • $lists->title
  • $lists->image //this is the full html img tag
  • $lists->imageURL //image URL only, can be used to create your own tag
  • $lists->thumbnail
  • $lists->errors
  • $lists->author
  • $lists->manufacturer
  • $lists->listPrice
  • $lists->newPrice
  • $lists->usedPrice
  • $lists->buyNow
  • $lists->editorialReview
  • $lists->reviews //includes reviews iframe
  • $lists->iframeurl //the iframe URL, can be used to set up your own iframe tag if preferred

You can also edit the css for the output, which is in the plugin file amazonWS/css/amazonWS.css.

The default styles which are defined are:-

a.amazonWSlink:link {
line-height:40px;
font-size:16px;
font-weight:bold;
background-color:#cccccc;
border:outset 4px;
padding:3px;
}
a.amazonWSlink:hover {
text-decoration:none;
}
iframe.amazonReviews {
float:left;
width:100%;
height:350px;
}

which control the 'Buy Now' button and the format of the iframe which displays the customer reviews.

The following style element classes are also available:-

  • span.amazon_author
  • span.amazon_manufacturer
  • span.amazon_listprice
  • span.amazon_newprice
  • span.amazon_oldprice
  • img.amazonWS_img
  • span.amazon_editorial
  • h3.amazonWS

You can of course define your own by editing the template to include additional elements.