In my app_mappings.cfm template (which is included in app_globals), I create
3 structures for maps.
1.) request.cfmap
2.) request.webmap
3.) request.physmap
Example: <img src="#request.webmap.images#/myimage.jpg">
Here's an example of my app_mappings.cfm
---------------------------------------------------------------
<cfscript>
/* Structure for Web Mappings */
request.webmap = structnew();
/* Structure for CF Mappings */
request.cfmap = structnew();
/* Structure for Physical Mappings */
request.physmap = structnew();
/* mappings are different if in devmode */
if (request.devmode) {
request.cfmap.root = "/myapp";
request.webmap.root = "/myapp";
request.physmap.root = "C:\inetpub\myapp";
request.webmap.sslroot = "#request.webmap.root#";
request.webmap.url = "http://127.0.0.1/myapp";
} else {
request.cfmap.root = "/myapp";
request.webmap.root = "";
request.physmap.root = "d:\domains\whatever";
request.webmap.sslroot = "";
request.webmap.url = "http://www.whatever";
}
/* web mappings */
request.webmap.globals = "#request.webmap.root#/globals";
request.webmap.images = "#request.webmap.globals#/images";
request.webmap.photos = "#request.webmap.globals#/photos";
request.webmap.logos = "#request.webmap.globals#/logos";
/* physical mappings */
request.physmap.globals = "#request.physmap.root#\globals";
request.physmap.images = "#request.physmap.globals#\images";
/* cf mappings */
request.cfmap.globals = "#request.cfmap.root#/globals";
request.cfmap.actions = "#request.cfmap.globals#/actions";
request.cfmap.appfiles = "#request.cfmap.globals#/appfiles";
request.cfmap.blocks = "#request.cfmap.globals#/blocks";
request.cfmap.javascripts =
"#request.cfmap.globals#/javascripts";
request.cfmap.queries = "#request.cfmap.globals#/queries";
request.cfmap.styles = "#request.cfmap.globals#/styles";
request.cfmap.modules = "#request.cfmap.globals#/modules";
</cfscript>
-----Original Message-----
From: Douglas Brown [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 05, 2001 10:52 PM
To: Fusebox
Subject: structure question
I am creating a fusebox app with about 500 tables and about 20 different
folders, inside each sub-folder I have three other folders called (qry, dsp,
act) and my question is should I create a development mapping to all folders
that will hold templates or should I create a single mapping and use
#request.cfroot# in the index.cfm of each primary folder? I hate typing out
these long lines for the path to the folders using #request.cfroot# but if I
should do it, I will.
Thanks
Doug
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists