Here are a few points to help (me) remember what's going on with these things and how to set them up right the first time.
- They are NOT like web server mappings. They really can only be used inside the cfmodule or cfinclude tags. You can't create a mapping and expect to use it throughout the site. It definitely will not work on pages that are not run through the cf engine.
- In my normal setup, their is generally one mapping per application that points to the Application root, not the server root. This helps keep the code somewhat portable and lets Dreamweaver keep up with your locations.
- Setting up your site in Dreamweaver - the local root folder should also point all the way down to the root of the application, not necesarily the web root.
- VSS should mimic this layout. If you have your application root set to c:\inetpub\wwwroot\intranet\application1, VSS should be set up with a project like this: $/intranet/application1.
- One aspect that I find VERY confusing is that using the "/" in your cfincludes calls up your mapping, while using "/" in regular html, like an image source, calls up the web root.
A lot of people like to set paths in their application.cfm files. While this works fine (and is probably more robust), I just find it ugly to look at inside my code. Plus, everything you reference that way is generally shown as broken in Dreamweaver.
I think if dreamweaver had a way to supply a design time value to it's variables, that would allow the application.cfm method to feel more natural, but I haven't found a way to do that.
Note to self: update this posting if you find a better way to manage these mappings. I'm pretty sure Blackstone worked the same way.