Linking to a particular category
On my site I will have rotating product displays and would like to link those to the product category that product is in - not to the product itself.
What's the best way to accomplish this?
Mick
On my site I will have rotating product displays and would like to link those to the product category that product is in - not to the product itself.
What's the best way to accomplish this?
Mick
The category link would have to look like the following:
Products_Results.php?Search=1&ProductCategoryID[]=1
The ProductCategoryID[]=1 should have a different category id based on what category you're looking for.
Jimmy
Thanks.
Can it be structured as a relative rather than absolute link?
If I use absolute links I'll need to replace them when the site goes live.
Mick
Yes, you should be able to use relative links as well, I was just giving the full url so you could see what it would look like.
Jimmy
On my home page index.php I have a header and 3 product display boxes the contents of which are all driven by a script - rotator.php.
The path and links etc. to images displayed are contained in .ini files.
The following is how a link is defined in the .ini file with a link to a product category as you explained earlier in this thread…
[Caps]
src = rotate/wearbox/caps1.jpg
alt = Caps
url = ../intuhorses/Products_Results.php?Search=1&ProductCategoryID[]=93
title = Caps
id =
class =
I get the following results.
On the site I linked above the url is changed to
…<a href="../intuhorses/Products_Results.php?Search" title="">…
which takes me to a listing of all the products.
On my local server (mac Mini Leopard MAMP) the page is aborted at that point with…
"Unable to read ini file."
If I remove that link - no problem.
Any idea how I can fix this?
Thanks
Mick
I'm not that experienced in setting up ini files, but it seems that the = character is a special character and needs to somehow be escaped or encoded for it to be put in the ini file. Maybe try the url encoded value:
ref_urlencode.asp
All greek to me.
I've opted to remove rotator.php and have replaced it with ProjectSeven's Image Rotator Magic.
Mick
Instead of using the "=" use the value that it matches up with in that link I sent you. Try that to see if it works.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.