Jeff,

<cfinclude paths are not related to the paths of the web server.  You can in fact create arbitrary aliases for paths
(mappings) that out of your web root altogether.  CF always uses a path that is relative to the current template path.
So if your developer is 1 directory below the root he would use "../blah.cfm".  Again, don't let him even bring up the
image paths and virtual directorys et al.  The web server doesnt' control this at all.  If he wants a mapping to root he
can create one in CF admin (using "/") and this is actually done by default - and it's fine if you are not on a shared
server or you have control over the environment. But if you are on a shared server be careful because everyone can
include from "your" directory now using the root mapping. savy?

Mark A. Kruger, MCSE, CFG
www.cfwebtools.com
www.necfug.com
http://blog.mxconsulting.com
...what the web can be!

  -----Original Message-----
  From: Jeff Small [mailto:[EMAIL PROTECTED]
  Sent: Thursday, March 25, 2004 10:55 AM
  To: CF-Talk
  Subject: Okay, bear with me, I'm not even sure what I'm asking...

  Okay, here's the deal. One of our programmers has created an include that
  would be in the root of a site (call it, "navbar.cfm") and there's one page
  (index.cfm) that calls it from the root (<cfinclude template="navbar.cfm">).

  Now, in navbar.cfm, there's a path to an image (let's say <img
  src="" for instance). He's using absolute paths
  because he says "slash images should always refer to the root" and doesn't
  understand why he can't include that same file in a page one directory below
  (about/index.cfm) and it not work. In other words, when the page below
  (about/index.cfm) tries to reconcile the path, it's seeing the same path
  that the root page is seeing (<img src="" and
  it's breaking it and not showing the image (so now, when you "view source"
  on the page, you see http://devserver.ourdomain.com/images/... and you
  should see http://devserver.ourdomain.com/ThisSite/images/...) .

  Now, our development server is set up on a smallish PC running IIS and the
  site (and all others in development) is set up under the webroot of the IIS
  server, so that when you're testing it, you simply go to
  http://devserver.ourdomain.com/ThisSite/ and you can see the root of
  "ThisSite" which is the directory "ThisSite" under webroot
  (C:\InetPub\wwwroot\ThisSite).

  Is a virtual directory what he's looking for? Is it a mapping issue? I
  admit, I'm fairly stupid when it comes to IIS issues and web server
  administration issues, and will readily admit that I'm no mapping wizard, so
  I hope I explained it correctly, but I'd love to be able to do this.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to