Mike, That sounds like a feasible idea. I could put all the include files into a new folder, "myIncludes" and ask the host techs to create a CF mapping to that folder. If using a CF mapping it doesn't have to be relative. Thanks for the idea. If it works out I'll post back. Loyd Campbell Plano, Texas _____
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ferris, Mike Sent: Friday, September 14, 2007 9:47 AM To: Dallas/Fort Worth ColdFusion User Group Mailing List Subject: RE: [DFW CFUG] Newbie question Loyd, How about creating a mapping "myHeaders" in \inetpub\wwwroot\myApp\myHeaders. This would get around sharing the root issue. Then <cfinclude template = "/myHeaders/header.cfm" /> where ever you need it. This should be "relative" to the webroot. Mike _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Loyd Campbell Sent: Friday, September 14, 2007 9:37 AM To: 'Dallas/Fort Worth ColdFusion User Group Mailing List' Subject: RE: [DFW CFUG] Newbie question Dave, I appreciate your input. In the CF documentation, discussing relative paths in the cfinclude tag, it uses "/header.cfm" as one example. I know that this is not strictly a relative path, but it has always worked for me. In my previous experience the /header.cfm call would look in the web root. I know that ../header.cfm calls the file from one directory up, ../../header.cfm from two directories up, etc. The problem is that if the call to the header file is in the /dir1/dir2/ directory, a strictly "relative" call would have to be the ../../header.cfm call. That type of call precludes using the same code to call the header.cfm file from anyplace in the site unless each call is individually coded, which I am loathe to do. (love copy/paste (;o) ) I'm not sure I'm really communicating the problem, but it is sure stumping me. I hope someone has a good idea on how to overcome this little bitty sticky problem. Thanks, Loyd Campbell Plano, Texas _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Shuck Sent: Thursday, September 13, 2007 9:55 PM To: Dallas/Fort Worth ColdFusion User Group Mailing List Subject: Re: [DFW CFUG] Newbie question Grammar is my specialty.... sheesh. I hate hitting send too soon. :) On 9/13/07, Dave Shuck <[EMAIL PROTECTED] > wrote: Loyd, /header.cfm is not a relative path and but rather, it would look in the root directory. A relative path to header.cfm in the same directory as the calling template could be accessed like this: <cfinclude template=" header.cfm" /> or <cfinclude template="./header.cfm" /> On 9/13/07, Loyd Campbell < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: I've been writing CF since version 1, but have always been behind corporate firewalls or on dedicated servers. Now I'm working on a public site on a shared server and have a question that seems pretty basic to me, but I can't figure out the answer. To make a site more maintainable we use include files for headers, footers, navigation panels, etc. In the past I have always been able to use this notation to get to a file on the root directory regardless of what directory the included file was called from: <cfinclude template="/header.cfm"> With a dedicated server that is not a problem. The problem is that the techs that work on the shared server say that this notation is not a "relative" path and cfinclude requires a relative path or a CF Admin mapped path. I asked if they could map "/" to the web root of our site and they said they cannot because of the shared status. I've tried several other techniques without success. I looked up the CF Docs and they say that "/header.cfm" is a relative path. When I try it, though, it throws an error about using relative or CF mapped paths in cfinclude. Has anyone got a relatively simple solution to this problem? I hate to have multiple copies of a header, footer, or navigation file because that defeats the purpose. Thanks, Loyd Campbell Plano, TX _______________________________________________ Reply to DFWCFUG: [email protected] Subscribe/Unsubscribe: http://lists1.safesecureweb.com/mailman/listinfo/list List Archives: http://www.mail-archive.com/list%40list.dfwcfug.org/ http://www.mail-archive.com/list%40dfwcfug.org/ <http://www.mail-archive.com/list%40dfwcfug.org/> DFWCFUG Sponsors: www.instantspot.com/ <http://www.teksystems.com/> www.teksystems.com/ -- ~Dave Shuck [EMAIL PROTECTED] http://daveshuck.instantspot.com -- ~Dave Shuck [EMAIL PROTECTED] http://daveshuck.instantspot.com CONFIDENTIALITY NOTICE: The information contained in this e-mail and attached document(s) may contain confidential information that is intended only for the addressee(s). If you are not the intended recipient, you are hereby advised that any disclosure, copying, distribution or the taking of any action in reliance upon the information is prohibited. If you have received this e-mail in error, please immediately notify the sender and delete it from your system.
_______________________________________________ Reply to DFWCFUG: [email protected] Subscribe/Unsubscribe: http://lists1.safesecureweb.com/mailman/listinfo/list List Archives: http://www.mail-archive.com/list%40list.dfwcfug.org/ http://www.mail-archive.com/list%40dfwcfug.org/ DFWCFUG Sponsors: www.instantspot.com/ www.teksystems.com/
