> Ok, I know this subject was discussed a little bit earlier,
> and it got me thinking about a site I am currently developing.
> As it is, I am developing it as a subdirectory but it will
> eventually be moved over as the root site. My question is,
> which tags require the mapped root, as opposed to simply
> using /? The wrox book says the following:
>
> "Planning is required to make the best use of maps, as their
> use is limited to template references only through <cfinclude>..."
>
> So is <cfinclude> the ONLY tag that requires the mapped root?
> What about <cfmodule>? Can I do <cfmodule template="/module.cfm">,
> or would I need to do <cfmodule template="/mappedroot/module.cfm">.
OK. First, CFINCLUDE and CFMODULE behave exactly the same way, with regard
to how they resolve the TEMPLATE attribute. Second, this TEMPLATE attribute
can be used to specify either an absolute or a relative path. An absolute
path corresponds to an existing CF mapping, and begins with a "/". A
relative path begins with a filename itself, or a subdirectory within the
current directory, or "../" to reference a parent directory. Third, there's
no real difference between the root mapping ("/") and any other mapping
within CF Administrator, except that if you specify an absolute path such as
"/mydir/myfile.cfm" in a TEMPLATE attribute, and there is no mapping for
"/mydir", the root mapping will be used to resolve the path.
In general, I'd recommend avoiding the use of the root mapping, since you
can only have one root mapping on a physical server, but might have many
virtual servers with their own root directories. Of course, this means that
if you want to use absolute paths, you have to create them in the CF
Administrator, so you may choose to use relative paths instead.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
______________________________________________________________________
Why Share?
Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists