Site wide error template

2003-11-19 Thread Ryan Mitchell
Hello again

I remember a good while ago (6 months maybe) somebody made a site-wide error
template for shared hosting pages, which could be used to display a page
styled to each site...

I searched the archives and couldnĀ¹t find it, does anybody have it handy?
Care to share?

Ryan

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Site wide error template

2003-11-19 Thread Dave Watts
 I remember a good while ago (6 months maybe) somebody made a 
 site-wide error template for shared hosting pages, which could 
 be used to display a page styled to each site...

All you need to do, I imagine, is use conditional logic within your
site-wide error handler, and have it CFINCLUDE the appropriate file based on
the outcome of the condition. The big thing (to the extent that there is
one) is to figure out how you'll differentiate between one site and another
- I'd recommend using CGI.SERVER_NAME, I think - and where the CFINCLUDEd
files should be located, but those are essentially just conventions.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Site wide error template

2003-11-19 Thread Matt Robertson
As Dave said, all you need is a cfswitch on cgi.server_name.Inside each case you can then do whatever you want.It can be either very simple or very complex depending on what you need.

--
---
 Matt Robertson,[EMAIL PROTECTED]
 MSB Designs, Inc. http://mysecretbase.com
---

--
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Site Wide Error template FINALLY FIXED!!!

2002-07-29 Thread Brook Davies

Guys, thanks to some help in the forums from Dave Delbridge, I have finally 
got the site wide error handlers to work!

The thing is, I absolutely had to add a mapping pointing to my error 
template's as opposed to just referencing a relative path. Referencing a 
relative path just did not work! Honestly, I know what a relative path is, 
and I made a duplicate of my file in every directory imaginable, 
wwwroot,inetpub,cfroot, cfwwwroot and on and on. But to make a long story 
short, following Dave's advise, I added a mapping and used this to 
reference my error template and it worked. As Dave points out in his post, 
you will still get an error message saying the template does not exist, but 
this IS a bug and it will work regardless.

Dave's Post below
 
--

The key phrase is relative path. ColdFusion MX requires a relative path 
to your error-handling templates, whereas ColdFusion 5.0 and earlier 
accepted an absolute path, a la C:\MyErrorPages\Error404.cfm. A bug in CF 
Admin (see below) makes this even less intuitive.

The solution is to create a mapping to your error templates. Then, specify 
this relative path in your Missing Template Handler and Site-wide Error 
Handler fields. For example:

Mappings:
Logical Path: /Errors
Directory Path: C:\MyFiles\MyErrorTemplates\

Settings:
Missing Template Handler: /Errors/Error404.cfm
Site-wide Error Handler: /Errors/ErrorCF.cfm

As of CF version 6.0, when you submit these changes in CF Administrator, 
the file does not exist errors WILL APPEAR. This is a bug. Ignore these 
warnings and test your templates manually. You'll likely find that they 
function perfectly.

Dave Delbridge
Circa 3000
ColdFusion Hosting


__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
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