Please note, I haven't tried this, so take this with a grain of salt.
The cfa_container tag takes a lDefaultRuleTypeIDs attribute. Supposedly this
allows you to default a rule in the container. A cursory check of the code
makes it seem like nothing actually puts this rule in when the container is
created. I believe it simply defaults that particular rule when you first do
an edit.
Hmm, ok, I looked around a bit, and from what I can see, you can mimic what
the default container editor does to add a rule. It checks how many rules
are in the container [ ArrayLen(object.aRules) ], and adds one to it. It
then creates a new object of the rule type, setting the object ID = (object
id of container).aRules[newposition]. Which is how you set an embedded
object into an array property.
Does this make sense? To see what I'm talking about, look at
\spectra\handlers\system\publishing\container\editor\editorrules.cfm.
p.s. This looks like a good candidate for a custom tag.
=======================================================================
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
> -----Original Message-----
> From: Nikki Forshaw [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 08, 2001 9:02 AM
> To: Spectra-Talk
> Subject: Apply rules to containers programmatically....
>
>
> Hi All,
>
> Does anyone know if it is possible to apply rules to containers
> programmatically?... I have a template page with quite a few
> containers which need the same rule applied to each of them...
> the template allows for new sections and pages to be created
> dynamically, but it would be useless if the rules weren't applied
> programmatically.
>
> Any help or ideas would be welcome!
>
> Thanks,
> Nikki
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.