Use fully qualified pathways not relative ones:

 http://www.mysite.com/siteroot\css\sitecss.css

-----Original Message-----
From: Elizabeth Meyer [mailto:[email protected]] 
Sent: 17 April 2009 20:37
To: cf-newbie
Subject: Application.cfc & layout


I have used the Application.cfc onRequestStart and onRequestEnd for the
layout of my site, i.e. common header and footer on all pages.

Now the problem comes in where I have some files in a subdirectory. (The
application.cfc is only in the root directory)

The content displays fine, but the images, CSS file and links are
referencing the wrong folder and thus not displaying.

e.g.

my CSS is in siteroot\css\sitecss.css
subdirectory file siteroot\subdir\somefile.cfm

so somefiles.cfm uses the application.cfm in the siteroot to call the page
header tags, it includes the CSS files as siteroot\subdir\css\sitecss.css
which is obviously not there.

I have the same problem with links:
the main navigation is in the application.cfc onRequestStart

but if this is called from the siteroot\subdir\somefile.cfm it points to
siteroot\subdir\aboutUs.cfm instead of siteroot\aboutUs.cfm

Anybody have any ideas on how I can resolve this?

Thanks! 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4527
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to