Thanks Kate, That's what I needed. Also thank you Ray.



-----Original Message-----
From: Kate De Jong [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 10, 2001 12:54 PM
To: Spectra-Talk
Subject: RE: Accessing values from an array....


We've had to get at metadata category & keyword info before. Here's the code
we've had to use to get to the categories in an object:

***************

<!--- Get the objects --->
<cfa_contentobjectgetmultiple
        datasource="#prgn_corp_db#"
        typeid="D02ACB75-6FE0-11D4-9C160090277322BD"
        r_qobjects="qPartners"
        r_stobjects="stPartners">

<!--- Sort the objects --->
<cfa_structSortCommonSubkeys
    struct = "#stPartners#"
    commonSubKey = "label"
    r_aSortedKeys = "akey">

<!--- Loop through the objects --->
<CFLOOP list="#arraytolist(akey)#" index="ct">
<cfoutput><h4>#stPartners[ct].label#</h4></cfoutput>
        <!--- Get the categories for Keywords for one object - This will
return the uuid's of categories assigned --->
        <cfset categorylist = #stPartners[ct].stkeywords['lcategories']#>
                <cfoutput>#categorylist#<br></cfoutput>
        <!--- counts the number of key word phrases in the object --->
        <cfset Stcount = StructCount(stPartners[ct].stkeywords)>
        <!--- Struct to a list --->
        <CFSET keysToStruct = StructKeyList(#stPartners[ct].stkeywords#,
",")>
        <!--- gets us each key word including the label Lcat and displays
them --->
        <cfset stKeywords = StructNew()>
        <CFLOOP INDEX="LC" FROM="1" TO=#stcount#>
                <cfoutput><font
size="-1">#ListGetat(keysToStruct,LC)#</font><br></cfoutput>
                </cfloop>
</cfloop>

*****************
I think what you're going to need is the "structurename.stkeywords[]".

Then you have to loop through the stkeywords to display them.

Hope this is what you're looking for.

-Kate
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to