In lay terms, what is the main difference between "rules" and "types";
what does each do? What's the difference and how do they relate to one
another? We realized we were confused during our attempts to create a
custom "Story" content item that used needed to use custom fields and a
custom name to display in the rule list in the container wizard.

1) We started the process of creating a custom type for "Story" in an
attempt to build a custom form that would be accessible via a custom
tab in the admin; thus, we went through the process of creating a new
.cfc file in the "types" directory, deployed it, etc.

2) But we also wanted to display "Story" for the title in the rule list
in the container wizard, so we went through the similar process of
creating a .cfc file in the "rules" directory, and deployed that. We
then noticed some redundancy and started getting confused. Do we need
both?

The process of updating the .cfc files for creating a custom rule is
the same for that of a "type" except for the fact that you save the
.cfc file in either a "rule" or "type" directory. Furthermore, in
reading the documentation we found (from Brendan Sisson), it appears
the code in the both the rules and type .cfc files are very similar,
(See examples below), thus what is the functional difference between
the two?

We'll need to be able to explain this to the client as well .. in lay
terms.

---------------------------------

"Rule" .cfc code sample:

<cfcomponent displayname="Feature Photo Rule"
extends="farcry.farcry_core.packages.rules.rules" hint="Provides
links and summarys of daemon training courses" bCustomRule="1">

<cfproperty name="intro" type="string" hint="Intro text for the
Feature Photo" required="no">

<cfproperty name="displayMethod" type="string" hint="Display method
to render this photo rule with." required="yes"
default="displayTeaserFeature">

</cfcomponent>

------------------------------------------------

"Type" .cfc code sample

<cfcomponent extends="farcry.farcry_core.packages.types.types"
displayname="Custom gallery object" hint="A gallery for showing
associated photos" bCustomType=1>

<!--------type properties-------->

<cfproperty name="title" type="string" hint="Gallery title"
required="Yes" default="">

<cfproperty name="defaultPhoto" type="string" hint="Default image to
identify gallery" required="no" default="">

<cfproperty name="description" type="string" hint="Basic description
of gallery" required="no" default="" >

<cfproperty name="status" type="string" hint="Satus of gallery
(draft/pending/approved)" required="Yes" default="draft">
 
</cfcomponent>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/farcry-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to