> I cannot see/find Image Objects so I cannot drop the image into the
> container.
If I had to guess, I'd say that Image Objects is a system type. The browser
you use to add stuff to a container does not show system types. I don't know
why images would be marked as system... maybe you can just turn it off.
> I'd actually prefer to load a container w. an image programmatically (ie.
> without resorting to the webtop). I can get the image w.
> <cfa_contentObjectGet> if I lookup its ID. I tried using
> <cfa_content> which
> displays it on the page but not in the container. What tag should I be
> using?
Well, you really have two questions here. One question is, how can I add
crap to a container w/o using the widgets. The other is, how can I
dynamically fill a container. For example, you may want to place an image in
a container and keep it there (question one), or, you may want to pick an
image for the container based on the current time (question two).
The second question is the easiest to answer. Simply create a publishing
rule.
As for the first question - it depends. Duncan has some tags that allow you
to easily add objects to containers. You can find these on the Dev Exchange.
I've also written some tags (not yet released) that add/delete from the
container as long as only the Schedule Content rule is applied. The code is
pretty simple, so I'll show it here as an example:
Please note that this is code was written pretty quickly and needs to be
rewritten a bit cleaner.
<CFPARAM NAME="Attributes.ContainerID" TYPE="UUID">
<CFPARAM NAME="Attributes.lObjectIds">
<CFPARAM NAME="Attributes.Method">
<CFPARAM NAME="Attributes.TypeID" TYPE="UUID">
<CFPARAM NAME="Attributes.Where" DEFAULT="End">
<!--- Get the container --->
<CFA_GetDescriptor ContainerID="#Attributes.ContainerID#"
DataSource="#Request.CFA.DataSource.DSN#" r_stDescriptor="Data">
<!--- First rule --->
<CFSET RuleData = Data.ARules[1]>
<CFSET Group1 = RuleData.stParams.Agroups[1]>
<CFSET ObArray = Group1.AObjects>
<!--- Now loop through --->
<CFLOOP INDEX="ID" LIST="#Attributes.lObjectIds#">
<CFIF Attributes.Where IS "End">
<CFSET ObArray[ArrayLen(ObArray)+1] = StructNew()>
<CFSET ObArray[ArrayLen(ObArray)].ObjectID = ID>
<CFSET ObArray[ArrayLen(ObArray)].Method = Attributes.Method>
<CFSET ObArray[ArrayLen(ObArray)].TypeID = Attributes.TypeID>
<CFELSE>
<CFSET ArrayPrepend(ObArray,StructNew())>
<CFSET ObArray[1].ObjectID = ID>
<CFSET ObArray[1].Method = Attributes.Method>
<CFSET ObArray[1].TypeID = Attributes.TypeID>
</CFIF>
</CFLOOP>
<!--- Do clean up, Ray, why do I have this? Well, not sure, but it may
help prevent the container corruption that I keep getting --->
<CFLOOP INDEX="X" FROM="#ArrayLen(ObArray)#" TO="1" STEP="-1">
<CFIF NOT Len(Trim(ObArray[X].ObjectID))>
<CFSET ArrayDeleteAt(ObArray,X)>
</CFIF>
</CFLOOP>
<!--- Convert back --->
<CFSET Data.ARules[1].stParams.AGroups[1].AObjects = ObArray>
<CFA_UpdateDescriptor ContainerID="#Attributes.ContainerID#"
DataSource="#Request.CFA.DataSource.DSN#" stDescriptor="#Data#">
=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Allaire
Email : [EMAIL PROTECTED]
ICQ UIN : 3679482
"My ally is the Force, and a powerful ally it is." - Yoda
------------------------------------------------------------------------------
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.