At 10:31 AM 4/15/2002 -0400, you wrote:
>i need someone to give me the loaddown on how cferror looks for the
>templates. here's the situation. i have a site the where i have a template
>called settings.cfm that i put all of the settings for the site in. this
>includes the cfapplication tag, a bunch of global variables, and the cferror
>tags. now the reason i do this is because i use the application.cfm tag to
>also include the header.cfm file, which is the header for that particular
>section. This setup allows me to write the settings once and include them in
>child directories while being able to change the header for each child
>directory if i want.

  I see nothing wrong with that approach.


>ok, enough with the setup, now onto the question. the
>thing is, i usually make a blobal variable called request.serverroot which
>is the root path of the website, usually this is set to "/". so in my
>settings.cfm, in the root directory of the website, i call the cferror tags.
>the template path parameter of these tags, i set to
>"#request.serverroot#error.cfm". which equates to "/error.cfm", which is
>where the error.cfm is, in my root directory.

  : hmm:  As a point of reference, ColdFusion will not look at web 
mappings, just ColdFusion mappings.  My guess is that is your problem.
  In the ColdFusion administrator, do you have '/' pointing to your server 
root?

   What I like to do is set such a variable in a way relative to the root 
directory:
     Root directory:           /
     Subdirectory:           ../
     SubSubDirectory:  ../../

  Your application.cfm will be like this:

     set rootdirectory variable
     Include settings.cfm
     include header for files in this directory

  The next question is whether it is a good idea to map '/' to the 
directory root.  If you only have one application, or domain, on the 
server, then it probably won't be a big deal.  If you have more that might 
be confusing.


--
Jeffry Houser | mailto:[EMAIL PROTECTED]
Need a Web Developer?  Contact me!
AIM: Reboog711  | Fax / Phone: 860-223-7946
--
My Books: http://www.instantcoldfusion.com
My Band: http://www.farcryfly.com 

______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to