Results 1 to 4 of 4
  1. #1
    Newbie
    Join Date
    January 18th, 2005
    Posts
    43
    Can you create a vertical column that displays only the clickable picture or that displays only the link, using the format or detail templates, to be included in a script call.

  2. #2
    Newbie
    Join Date
    January 18th, 2005
    Posts
    43
    Also can you truncate the {details.ProductName} results? Like a certain number of characters?

  3. #3
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Location
    Toronto, Canada
    Posts
    1,369
    1. Column of clickable pictures

    To create a vertical column that displays only the clickable picture, have a look at amazon-format/column.html which is the formatting file used to format the products shown inside the left column at:

    http://www.bime.com/cgi-bin/amazon.pl

    The column heading "Top Selling Books" and the green border of the column are hardcoded into the results template as a <TABLE> which is limited to WIDTH=128. The column.html formatting file is used to create the column contents which is included in the results template via a script tag such as:

    <SCRIPT SRC=/cgi-bin/amazon.pl?script&format=column></SCRIPT>

    To limit the number of products to 5, add &pagesize=5 to the SCRIPT SRC.

    Make a copy of the column.html formatting file and then play around editing the copy.


    2. Column of text links

    To create a vertical column that displays only the product title, have a look at amazon-format/listol.html (ordered list) or amazon-format/listul.html (bullet list). See:

    http://www.bime.com/cgi-bin/amazon.pl?format=listol
    http://www.bime.com/cgi-bin/amazon.pl?format=listul

    Make a copy of the listol.html or listul.html formatting file and then play around editing the copy.


    3. Truncate {details.ProductName}

    To truncate a formatting code, add :NUMBER to it. For example to limit the product name to 34 characters, use:

    {details.ProductName:34}

    If the length of the formatting code value is greater than NUMBER characters then the value is truncated by removing entire words from the right of the value. Then " ..." is appended (to indicate truncation). If the formatting code <!--format.moreinfo--> is not empty then it is appended after the " ...". The moreinfo defaults to a link saying "more info".

    See amazon-format/column.html which uses {details.ProductName:50} and also sets
    <!--format.moreinfo--> to empty so that "more info" doesn't show up.


    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  4. #4
    Newbie
    Join Date
    January 18th, 2005
    Posts
    43
    Your awsome!!!

  5. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Formating Data Help Needed
    By Doug247 in forum Programming / Datafeeds / Tools
    Replies: 4
    Last Post: August 6th, 2009, 01:05 AM
  2. DYSE Formating
    By mmcbee in forum Cusimano.com Scripts
    Replies: 6
    Last Post: May 5th, 2005, 05:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •