I am writing an application and I am keeping all of my components in a folder
called components that is in the root...
root
+ assets
+ components
myComponent.cfc
+ includes
include1.cfm
Application.cfc
index.cfm
If i try to call the component from the include it cannot find it...
<cfinvoke component="Components.myComponent" method="myMethod" .....>
I get.... Could Not Find Cold Fusion Component Components.myComponent
If I move the component to the same folder as the include it works....but I
would like to keep them all in the components folder so that everypage can
access them the same way.
There must be a way to do this or components arent nearly as effective as i
thought they are.
Thanks!
Josh
jeby - 30 Jun 2005 20:27 GMT
solved this one myself.....
you can but you have to use the whole path from the webroot
~root~.Components.myComponent
If the file you are invoking it from is in the root then you only need:
Components.myComponent