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