(I'm on MX so if something is different, let me know) You need to look at your collections first - go back and read the cf docs on collections too. OK, I see in your code you are using custom1 to return the URL in some cases. There's a better way by using the Return URL field, then calling #url#. It will append the location and file to the url. Then you would have 2 custom fields for other uses.
So here's an example: Collection Name: itdocs Directory Path: C:\inetpub\wwwroot\intranet\docs\ (making this up) Return URL: http://intranet.neath-porttalbot.gov.uk/itintranet/itdocuments/documen ts/ Now when you run the collection on this format... <a href="#url#">#Title#</a> You would get.... <a href="http://intranet.neath-porttalbot.gov.uk/itintranet/itdocuments/documen ts/foo.doc">Foo</a> For DB based Collections, say you were running through an articles query and the Articles table had an article_id. You would run the collection with a URLpath of the template that displays articles (i.e. view.cfm) - "http://www.domain.com/view.cfm?article_id=". Then for the custom1, you return the article_id so you would get URLs like.... <a href="http://www.domain.com/view.cfm?article_id=3">Something</a> Here's one of my db-base collections: <cfquery name="NewsResult" datasource="foo"> ... </cfquery> <cfindex collection="foo_news_collection" action="refresh" type="custom" body="Title, Long_Description" key="news_id" urlpath="http://foo.com/news/view.cfm?news_id=" custom1="news_id" query="NewsResult"> Then this format would work again and you only have to account for <cfif isDefined("custom1")> around the custom1 variable: <a href="#url##custom1#">#Title#</a> HTH, Ryan -----Original Message----- From: Ian Vaughan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 29, 2003 9:33 AM To: CF-Talk Subject: Re: Coldfusion and Verity Results ??? Ryan I can see what you are saying. Looking at my code then how can it be changed to accomodate this??? ----- Original Message ----- From: "Ryan Kime" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, January 29, 2003 3:27 PM Subject: RE: Coldfusion and Verity Results ??? > Ian, > > I'm not sure I follow your code example in that last email, but I see > what you are trying to do. I see where you have an IF isDefined() > statement based > on the collection "download". First off, that won't work when > outputting combined collections as the results get intermingled. Also, > shouldn't > "http://intranet.neath-porttalbot.gov.uk/itintranet/itdownloads/downloa > ds/" be your Return URL for the downloads collection? Why are you hardcoding > this value? > > When I write code, I try to make it as flexible as possible for the > information that is thrown at it. If I start hardcoding options, then > I am defeating the purpose of a dynamic web app. Personally, if all my > search collections didn't work with the following format, I would > rethink my > approach: > > <a href="#url##custom1##custom2#">#Title#</a> > > -----Original Message----- > From: Ian Vaughan [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 29, 2003 3:09 AM > To: CF-Talk > Subject: Re: Coldfusion and Verity Results ??? > > > Ryan > > When I set up my collections I am already using the custom1 and 2 > fields in > my collections. > > I have the search working when just searching individual collections > as you > can see from my code in the previous mail, I just need the search to return > all search results when the user selects search all collections > > So could I use another approach ?? for example use cfif > isDefined(collectionname) ???? > > For example > > <cfelse> > <!---Start output for all results---> > <p> > <CFOUTPUT query="GetResults" maxRows="#Form.MaxRows#"> > > <cfif isDefined "downloads > <cfoutput query="GetResults" maxRows="#Form.MaxRows#"> > > <B><a > href="http://intranet.neath-porttalbot.gov.uk/itintranet/itdownloads/downloa > ds/#custom1#">#title#</a></B> > <p>#summary#<br> > Search Relevance :#NumberFormat ( Round ( Score * 100) )# %</p> > > </CFOUTPUT> > </cfif> > > <cfif isDefined "itlinks > <cfoutput query="GetResults" maxRows="#Form.MaxRows#"> > > <B><a href="linkurl#">#linktitle#</a></B> > <p>#summary#<br> > Search Relevance :#NumberFormat ( Round ( Score * 100) )# %</p> > > </CFOUTPUT> > </cfif> > > etc............. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4