Aaron - Thank you for your help. Unfortunately, I am still getting an error.
I did do a cfa_dump previously and Category is one of the sections that
appeared. So I tried putting the following line in my code:

<p><font face="Arial" color="#headlinecolor#"> 
<h2>#r_stObjects[listfirst(structkeylist(r_stObjects))].Category# </h2></font></p>

And I got the following error message:
Error Diagnostic Information

An error occurred while evaluating the expression:


#r_stObjects[listfirst(structkeylist(r_stObjects))].Category#



Error near line 66, column 102.
----------------------------------------------------------------------------
----

The member "" in dimension 1 of object "r_stObjects" cannot be found.
Please, modify the member name.


The error occurred while processing an element with a general identifier of
(#r_stObjects[listfirst(structkeylist(r_stObjects))].Category#), occupying
document position (66:51) to (66:111).

I was a little confused by "member "" " in the error message, indicating to me there 
was an empty space found. This prompted me to test using the StructISEmpty function. 
The r_stObjects should be a structure, correct? Well, I ran the code and it behaved 
like the structure is empty. 

Let me know if you know what the problem is. Thanks.

Laura

----- Original Message -----
From: "Aaron Johnson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, February 02, 2001 8:46 PM
Subject: RE: Need Help With Displaying Objects


> Hi Laura,
>
> I copied and modified your code below.. couple things to look at in the
> comments I've made:
>
> <!--- instead of calling this "section1", call it typeid, for no other
> reason than the fact that it's more descriptive of the variable it
> holds... --->
> <CFSET typeid = request.stUserProfile.preferences.favoriteSection>
>
> <!---display user's preferential headline color and welcome user--->
> <div align="center"><font face="Arial" color="#headlinecolor#"><h3>Welcome
> #request.cfa.activeuser#!
> <p>Here are the top stories in your favorite areas for
> #today#.</p></h3></font></div>
>
>
> <!---Get ALL Objects of type #typeid#, this CODB call will retrieve a
> structure of objects which you can then loop over, like you're already
doing
> below... again, instead of calling the structure of structures you are
> returning "section1", describe it... "r_stObjects", the variable that this
> tag will Return, is a structure of objects... --->
> <cfa_contentObjectGetMultiple
>     dataSource="suntimes"
>     typeID="#typeid#"
>     r_stObjects="r_stObjects">
>
> <!--- here's where you're getting your error, you were trying to reference
a
> "key" called "category" in the structure called "section1".... that key
> doesn't exist.  I'm guessing that what you want to do is get the name of
the
> section that all these objects are coming from, yeah?  So do a <cfa_dump
> var=#r_stObjects#">... does that dump contain the name of the section you
> are trying to output here?  If so, you could do something like
> #r_stObjects[listfirst(structkeylist(r_stObjects))].sectionname# if
> sectioname was the name of the section you were trying to get at... --->
>
> <p><font face="Arial"
> color="#headlinecolor#"><h2>#section1.Category#</h2></font></p>
>
> <p>
> <!---display the objects with the method teaser--->
> <cfa_contentObject
>     dataSource="suntimes"
>     stObjects="#r_stObjects#"
>     method="teaser">
>
>
>
>
> If anything, it sounds like you might want to go have a weekend of
> structures, arrays and <cfa_dump>, along with some Dew.  Pick up Ben
Forta's
> CF WACK book and do some touch up on structures.  Sounds fun!
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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