Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resolving My Search Results

Status
Not open for further replies.

mickeyj2

Programmer
Jun 7, 2007
79
0
0
US
Hi,

I'm creating a search application. I have a file my srchform.cfm and it works fine. It returns results in the template srchresults.cfm.

Here's some of the contents of my srchresults.cfm file:


<CFSEARCH NAME="search_card"
COLLECTION="card"
CRITERIA="#FORM.criteria#">


And in the <body>,

<CFOUTPUT QUERY="search_card">
<a href="#URL#" target="blank" class="textlinks">#title#</a><br>
Score:#Evaluate(100* Score)#%<p>
</CFOUTPUT>


Notice above that I'm showing the Title in the search results.

Here's the problem. Some of my pages have the Title processed dynamically in a CFM page.

For example, I have:
#Card.CardName# - #Card.Description# #Card.CategoryName#

And in my search results, the information does not resolve to what it should be. It still stays as Coldfusion text.

It seems that <CFOUTPUT> would take care of the processing but it doesn't. Also, the page that I'm pointing to has its <TITLE> correct when I look at it on the browser.

Is there anything that I can do? I tried using <cfloop> for the query, and then wrap everything on the page around <CFOUTPUT>, but that still doesn't work.

I realize that <TITLE> is client-side and processed before any server-side processing, but I'm not sure how I can skirt around this.

Any advice you can give is appreciated.

Thanks for your help.

mickeyj2
 
Here's the problem. Some of my pages have the Title processed dynamically in a CFM page.

For example, I have:
#Card.CardName# - #Card.Description# #Card.CategoryName#

And in my search results, the information does not resolve to what it should be. It still stays as Coldfusion text.

Are you saying the value of #title# is literally a string of ColdFusion code like this?

#Card.CardName# - #Card.Description# #Card.CategoryName#

If I am understanding correctly, you need to use the Evaluate function. That function would force CF to fully evaluate the contained variable values.

Code:
#Evaluate(title)# ..



----------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top