• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

components

Explorer ,
Nov 28, 2007 Nov 28, 2007

Copy link to clipboard

Copied

I created the folder called components to stored all the cfc files there but I don't know the syntax to call the component from the diffrent directory.

Here what I have but it didn't work

compnents/img.cfc
<cfcomponent>
<cffunction name="Image" access="public" hint="image resize" returntype="string">
.......
</cffunction>
</cfcomponent>

.cfm file:
<cfinvoke component="/myroot/mydictory/compnents.img" method="Image">
<cfinvokeargument name="file_directory" value="#filedirectory#">
</cfinvoke>

Error: Could not find the ColdFusion Component or Interface img.

thanks
TOPICS
Advanced techniques

Views

322

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 28, 2007 Nov 28, 2007

Copy link to clipboard

Copied

You're mixing your path syntax. Try using dot-notation syntax

component="absolute.path.to.YourComponentName"
..or..
component="myroot.mydictory.compnents.img"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 29, 2007 Nov 29, 2007

Copy link to clipboard

Copied

LATEST
You can define a default location in your administrator.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation