Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 500

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Accessing and Using Data
status="s"
criteria="#form.criteria#"
contextPassages="3"
contextBytes="300"
contextHighlightBegin="<i><b>"
contextHighlightEnd="</b></i>"
maxrows="100">
<cfdump var="#s#">
<cfoutput>
<p>Number of records in query: #sr.recordcount#</P>
</cfoutput>
<cfdump var="#sr#">
<cfoutput Query="sr">
Title: <i>#title#</i><br>
URL: #url#<br>
Score: #score#<br>
<hr>
#context#<br>
<br>
#summary#<br>
<hr>
</cfoutput>
</cfif>
For more information on using the
in the CFML Reference.
Retrieving information about the categories contained in a collection
You can retrieve the category information for a collection by using the
action returns a structure that contains two keys:
categoryList
Variable
Description
categories
The name of the category and its hit count, where hit count is the number of documents in the specified category.
The document tree (a/b/c) and hit count, where hit count is the number of documents at or below the branch of the
categorytrees
document tree.
Use the information returned by
as well the document tree available for searching. You can also create a search interface that lets the user select what
category to search within based on the results returned by
<cfcollection
action="categoryList"
collection="collectionName"
name="info">
<cfoutput>
<cfset catStruct=info.categories>
<cfset catList=StructKeyList(catStruct)>
<cfloop list="catList" index="cat"> Category: #cat# <br>
Documents: #catStruct[cat]#<br>
</cfloop>
</cfoutput>
tag to create Verity collections with support for categories, see
cfindex
to display to users the number of documents available for searching,
categoryList
categoryList
Last updated 1/20/2012
tag's
cfcollection
categoryList
.
495
cfsearch
action.The

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents