Associate Engine : Sample "List" Format Templates | ||
Home > Associate Engine > Documentation > Sample "List" Format Templates |
|
Several sample Format Template are included with the Associate Engine script. Some of the Format Templates are designed to display a list or grid of products, while other Format Templates are designed to display a single product's details.
Shown below are the Format Templates designed to display a list or grid of products.
To use a particular Format Template, use the format parameter. For example, the following link uses the c3.html format template to show the 12 top selling DVD's:
The value of the format parameter specifies what format template to use. Note: Do not include the filename ending (e.g.: .html or .fmt) in the format parameter value.
Format Template files are stored in the
ae-format directory. You can open the format templates that end with .html using your HTML editor. You can open the format templates that end with .fmt using a text editor such as Notepad or Wordpad. Note: If your HTML editor checks for valid HTML, then the .fmt format files will not open properly in your HTML editor.Below are some sample formats. Each result below is created by using a <script> tag of the following format. The only difference between each example is the value of the format parameter (e.g. format=list1, format=list2, etc.).
<script SRC="/cgi-bin/ae.pl?script&type=search&keyword=harrison+ford&mode=dvd&pagesize=2&format=FORMATNAME"></script>
The <script> tag does a keyword search (type=search) for "Harrison Ford" (keyword=harrison+ford) in DVD's (mode=dvd) and returns 2 results (pagesize=2) formatted using the specified format template (format=FORMATNAME)
Praise: "The format file is an excellent concept, and it worked great for formatting my grid results so that I could do what I wanted with it." -- J.M., www.BuffyGuide.com |
If a format parameter is not specified, then the default format is used that displays results in a list as shown below.
<script SRC="/cgi-bin/ae.pl?script&type=search&keyword=harrison+ford&mode=dvd&pagesize=2"></script>
|
|
|
|
|
|
|
|
- Click here to see listol.html formatting file
- Click here to see HTML of listol.html formatting file
- Note: In this example, pagesize parameter has been set to 20
- Note: If you do not want to display prices, simply set the showprices configuration variable to no, or alternatively edit the listol.html file and remove the line that displays the price.
|
- Click here to see listul.html formatting file
- Click here to see HTML of listul.html formatting file
- Note: In this example, pagesize parameter has been set to 20
- Note: If you do not want to display prices, simply set the showprices configuration variable to no, or alternatively edit the listul.html file and remove the line that displays the price.
|
- Click here to see c3.fmt formatting file
- Note: In this example, pagesize parameter has been set to 9
|
- Click here to see c4.fmt formatting file
- Note: In this example, pagesize parameter has been set to 16
|
E.&O.E.; © Cusimano.Com Corporation; www.c3scripts.com