Gossamer Forum
Home : Products : DBMan : Installation :

Linking To Specific Item

Quote Reply
Linking To Specific Item
Hello,

How can I manually create a link to a specific Item.? I will try to make this question as clear as possible.

On the home page there will be a list of companies which we are dealing with. Once a user clicks on the company they would like, they get to a plain HTML page with all the categories for that company. Now this is where I need to know how to write the link. So let's say one of the companies was Sony. A person clicks on Sony, then they get to a page will all the categories sony has to offer, He chooses Video Cameras. So what I need this link to do is look in the database for a $rec{$Company} which is Sony, and $rec{$Category} which is Video Cameras, and display the results.

I hope this question is clear enough. Please tell me how to do this. Your help is greatly appreciated.

------------------
Thanks
JFrost

Quote Reply
Re: Linking To Specific Item In reply to
If you're linking from a static page, you would use

<a href="http://url/to/dbman/db.cgi?
db=default&uid=default&
Company=Sony&Category=Video+Cameras
&view_records=1">

If you have named your database something other than "default," change the bolded part of the code above.

One thing to watch out for is spaces in the Company and Category names. Be sure to replace them with +'s or the URL won't work.



------------------
JPD
Quote Reply
Re: Linking To Specific Item In reply to
Also, if you are linking to an ID number, then you will want to add in ww=1 otherwise, a search for ID=5 will return ID=51, ID =15, etc.

Cheers,

Alex
Quote Reply
Re: Linking To Specific Item In reply to
Hi Alex,

When you mean to add the ww=1, where exactly should I add it.?

------------------
Thanks
JFrost

Quote Reply
Re: Linking To Specific Item In reply to
The ww=1 would be somewhere within the url, like:

<a href="http://url/to/dbman/db.cgi?
db=default&uid=default&
Company=Sony&Category=Video+Cameras
&ww=1&view_records=1">

The "ww" command means whole words. As you described your plan, you probably won't need it, but it is necessary if you are going to do a search on ID numbers.


------------------
JPD
Quote Reply
Re: Linking To Specific Item In reply to
Cool. That can be used when you change from short to long display as well - just add: &ww=$rec{'ID'} and that's it. Nice.



------------------
Jason
Extreme mtb
http://extreme.nas.net