Dave, here is the code from the custom tag I use. You need to know the
container ID, but this works ok for me since I know what containers would
have my ob. For example, if I'm deleting a FAQ object, I know that if it
_IS_ in a container, it's in the FAQ container.
p.s. This code is "Use at your own risk"-ware.
p.s. This code is in use on the community source site and so far - it's
working ok.
p.s. This code assumes that ContainerID is a container that has the "Most
Recent" rule applied to it.
<CFPARAM NAME="Attributes.DataSource">
<CFPARAM NAME="Attributes.ContainerID">
<CFPARAM NAME="Attributes.ObjectID">
<CFA_ContentObjectGet DataSource="#Attributes.DataSource#"
ObjectID="#Attributes.ContainerID#" r_stObject="container">
<CFSET Group1 = Container.ARules[1].AStartOrder[1]>
<CFA_ContentObject DataSource="#Attributes.DataSource#"
ObjectID="#Attributes.ContainerID#.aRules[1]" Method="GetInvocations"
r_stParams="gresults">
<!--- gresults should have one key. In our case, we get the first key, and
assume it's the only key --->
<!--- I use a list function just to be extra careful. --->
<CFSET Ob = ListFirst(StructKeyList(GResults))>
<CFSET Ainvocations = GResults[Ob].AInvocations>
<CFLOOP INDEX="X" FROM=1 TO="#ArrayLen(Ainvocations)#">
<CFIF AInvocations[X].objectID IS Attributes.objectID>
<CFSET KillStr = "#Group1#&#X#">
</CFIF>
</CFLOOP>
<!--- Now kill it --->
<CFIF IsDefined("KillStr")>
<CFSET ParamsToKill = StructNew()>
<CFSET ParamsToKill.lInvocationKeys = KillStr>
<CFA_ContentObject DataSource="#Attributes.DataSource#"
ObjectID="#Attributes.ContainerID#.aRules[1]" Method="DeleteInvocations"
stParams="#ParamsToKill#">
</CFIF>
=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia
Email : [EMAIL PROTECTED]
ICQ UIN : 3679482
"My ally is the Force, and a powerful ally it is." - Yoda
> -----Original Message-----
> From: Dave Crosby [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 06, 2001 5:58 PM
> To: Spectra-Talk
> Subject: Re: Deleting Objects
>
>
> Yes please send again.
>
> ----- Original Message -----
> From: "Raymond Camden" <[EMAIL PROTECTED]>
> To: "Spectra-Talk" <[EMAIL PROTECTED]>
> Sent: Saturday, 05 May, 2001 12:41 AM
> Subject: RE: Deleting Objects
>
>
> > I think the point is, and this is Ray's opinion, not MMs, that
> this would
> > still create an slowdown on deleting. This is really something
> that should
> > be handled by the delete handler on a case by case basis. Just
> my opinion.
> > :)
> >
> > FYI, there is a method you can call on containers to get the object IDs
> > inside of it. I posted a template a few weeks back that showed
> an example
> of
> > this. I can post it again if people want.
> >
> > =======================================================================
> > Raymond Camden, Principal Spectra Compliance Engineer for Macromedia
> >
> > Email : [EMAIL PROTECTED]
> > ICQ UIN : 3679482
> >
> > "My ally is the Force, and a powerful ally it is." - Yoda
> >
> > > -----Original Message-----
> > > From: Dave Crosby [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, May 03, 2001 7:07 PM
> > > To: Spectra-Talk
> > > Subject: Re: Deleting Objects
> > >
> > >
> > > What about Spectra 1.5.1 creating a list of container items to delete
> and
> > > scheduling a batch process to remove them? It would save us lots of
> code.
> > >
> > > ----- Original Message -----
> > > From: "Raymond Camden" <[EMAIL PROTECTED]>
> > > To: "Spectra-Talk" <[EMAIL PROTECTED]>
> > > Sent: Friday, 04 May, 2001 6:17 AM
> > > Subject: RE: Deleting Objects
> > >
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.