Ben, I think the technique is very cool. I know what you say is true. My old brain keeps slipping back to the days of C and telling me that cfinclude includes the *code* of the included template in the including template. But no, it *calls* the code and includes the *output*. So my C brain says "thats twisted - that's a bug" - but my CF brain says "Cool technique, Ben - wish I'd thought of it".
Jaime -----Original Message----- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Friday, 9 February 2007 7:17 AM To: CF-Talk Subject: RE: Referencing a CFC above the calling file. Jamie, Twisted. I don't see how. As far as bug. I would say not at all. Many things in ColdFusion are based on a path relative the CURRENT template, NOT the base template path. Creating CFCs is one of them (others being CFInclude paths, CFModule paths). This just uses that architecture to the advantage of child directories. I would say this is not a bug at all. ....................... Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -----Original Message----- From: Jaime Metcher [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 7:34 PM To: CF-Talk Subject: RE: Referencing a CFC above the calling file. Ben, That's quite twisted. I'd even call it a bug. I wish I'd thought of it. This probably doesn't help Andy, but the way I deal with this is to use IIS virtual directories, not CF mappings, and remove all IIS permissions to the virtual directory. This addresses Peter Bell's security concerns - the web server can't see the CFCs under any circumstances, but the CF server will quite happily find them and read them. Jaime Metcher -----Original Message----- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Wednesday, 7 February 2007 9:14 AM To: CF-Talk Subject: RE: Referencing a CFC above the calling file. Andy, I know that you already found a solution, but you might want to ake a peek at this one. I never used mapped paths and here is a solution that I have used before: http://www.bennadel.com/blog/348-Creating-ColdFusion-Components-In-Paren t-Directories-From-Sub-Directories-Without-Mapped-Paths.htm OR: http://www.bennadel.com/index.cfm?dax=blog:348.view Just thought you might be curious... ......................... Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -----Original Message----- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 2:55 PM To: CF-Talk Subject: RE: Referencing a CFC above the calling file. That's what I needed Doug. Thanks a lot for finding it! andy -----Original Message----- From: Doug Bezona [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 1:49 PM To: CF-Talk Subject: RE: Referencing a CFC above the calling file. No, it's quite relevant. >From the docs: "If you use a cfinvoke or cfobject tag, or the CreateObject function, to access the CFC from a CFML page, ColdFusion searches directories in the following order: 1. Local directory of the calling CFML page 2. Web root 3. Directories specified on the Custom Tag Paths page of ColdFusion MX Administrator" Note #2 - if it doesn't find it in the directory of the calling page, it next starts at the web root and works from there. If the component is outside of the web root, you're out of luck without a mapping - you can't do the equivalent of ../. All of the lookups are forward only. > -----Original Message----- > From: Andy Matthews [mailto:[EMAIL PROTECTED] > Sent: Monday, February 05, 2007 2:36 PM > To: CF-Talk > Subject: RE: Referencing a CFC above the calling file. > > Well, it's sort of irrelevant that it's outside the web root (or is it). > The > important thing is that the CFC exists ABOVE the calling page. How can you > create a path using dot notation to a file that's above your calling page? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269236 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4