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

invoking a CFC in another directory

LEGEND ,
Jul 10, 2006 Jul 10, 2006

Copy link to clipboard

Copied

If, off the main root, I have a folder called components and I put all the
site CFCs in there. How to I invoke them from the main root and from another
folder (root/news for example)

--
Wally Kolcz
Developer / Support


TOPICS
Advanced techniques

Views

363

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 ,
Jul 10, 2006 Jul 10, 2006

Copy link to clipboard

Copied

You can specify a default cfc location using the Adminstrator.

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
Participant ,
Jul 11, 2006 Jul 11, 2006

Copy link to clipboard

Copied

Wally, you can also specify the location of the component using dot notation

For example, if you have a component called calculator in the components directory you could use <cfobject> to invoke it like so:

<cfobject name="cfcCalculator" component="components.calculator">

You can nest folders as deep as you want and the last part of the component attribute will always be the component name, minus the .cfc extension.

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 ,
Jul 11, 2006 Jul 11, 2006

Copy link to clipboard

Copied

LATEST
Thanks. That's is what I thought.


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