Gossamer Forum
Home : Products : Links 2.0 : Customization :

Amazon Search

Quote Reply
Amazon Search
I'm trying to implement an Amazon.com search tag on an affiliate site, but I only want it to appear in the appropriate category and sub-categories. In this case it's "Books" along with the topics as sub-categories. The search tag has a drop down window to select a category and the link is coded to give the site owner credit for any sales that might result.
Does anyone have a suggestion for setting this up?
Thanks.
Blake
Quote Reply
Re: Amazon Search In reply to
In the category routine in site_html.pl, just put in a regular expression to check if the currently-being-built category contains the keyword Books. If so, then put in the code for the amazon.

Go to the section of html in the routine, where you want the amazon link to appear (if matches) and add:

~;
if ($category_name ~= /Books/) {
$output .= qq~
# amazon code here
~;
}
$output .= qq~

--Mark

------------------
You can reach my by ICQ at UID# 8602162

Quote Reply
Re: Amazon Search In reply to
I've found that with minor modification to site-html.pl and use of the header and footer features already built into Links that you can pretty much do anything you want with respect to categories looking differently. Not only that but the header and footer files are nothing more than generic HTML and if you're running links you should be an expert.

In you have additional questions about categorie header and footers feel free to ask as I've implemented them quite extensivly.

I used to have some of that Amazon stuff on my site, but feel free to look around and notice how all the major categories have a different look.

------------------
--------
Syndicate 23
http://www.netexpress.net/~syn23/
Quote Reply
Re: Amazon Search In reply to
I wasn't able to make the above code work.
But, by changing it to the code below, I was able to at least get the category page for Books to work.
Any ideas on how to get the Book sub-category pages to display the code as well?

~;
if ($category .= /Books/) {
$output .= qq~
# amazon code here
~;
}
$output .= qq~

Thanks.
Blake