EasyCFM.COM ColdFusion Forums / ColdFusion Applications / cfinclude template for subdirectory files

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: cfinclude template for subdirectory files

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

adotcomgirl
03-24-2004 @ 10:31 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 6
Joined: Mar 2004

The site is set up as following:

C:\inetpub\wwwroot\mywebsite\Application.cfm
C:\inetpub\wwwroot\mywebsite\index.cfm
C:\inetpub\wwwroot\mywebsite\commonfiles\header.cfm
C:\inetpub\wwwroot\mywebsite\commonfiles\footer.cfm

C:\inetpub\wwwroot\mywebsite\subdirectory\page1.cfm

I use
<cfinclude template=”commonfiles/header.cfm”>
<cfinclude template=”commonfiles/footer.cfm”>
in the index.cfm. It works fine. The problem is that when I use the same common include files in the subdirectory\page1.cfm e.g.
<cfinclude template=”../commonfiles/header.cfm”>
<cfinclude template=”../commonfiles/footer.cfm”>
it doesn’t work.

Does anyone can help?

Thanks


Webmaster
03-24-2004 @ 11:52 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4542
Joined: Jan 2002

It DOES work.. however...

What are you using withing the header/footer?

Any includes there?

Thanks,
Pablo Varando
Team Macromedia Member
=====================================================

adotcomgirl
03-25-2004 @ 7:12 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 6
Joined: Mar 2004

You are right, I checked again, the header.cfm and footer.cfm are working. In fact, it is the stylesheet styles.css in the header.cfm it doesn't work for the subdirectory files
e.g. root directory setup
C:\inetpub\wwwroot\mywebsite\index.cfm
C:\inetpub\wwwroot\mywebsite\stylesheet\style.css
C:\inetpub\wwwroot\mywebsite\commonfiles\header.cfm
C:\inetpub\wwwroot\mywebsite\subdirectory\page1.cfm
...

header.cfm
<html>
<head>
<title>My Web</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="stylesheet/style.css" type="text/css">
</head>
<body>
...

The style.css file works fine for the index.cfm, but doesn’t work in the page1.cfm

Any clue?

Thanks




Webmaster
03-25-2004 @ 8:35 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4542
Joined: Jan 2002

on the Header, change this:

<link rel="stylesheet" href="stylesheet/style.css" type="text/css">


to be this:
<link rel="stylesheet" href="/stylesheet/style.css" type="text/css">

or this:
<link rel="stylesheet" href="http://www.mysite.com/stylesheet/style.css" type="text/css">


Then it shoudl work Wink


Thanks,
Pablo Varando
Team Macromedia Member
=====================================================


Website Designed and Developed by Pablo Varando.