Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / June 2005



Tip: Looking for answers? Try searching our database.

Components

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jeby - 30 Jun 2005 15:58 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.