SitePoint Sponsor |
|
User Tag List
Results 1 to 13 of 13
Hybrid View
-
May 29, 2002, 09:45 #1
- Join Date
- Jul 2000
- Location
- Western Massachusetts, USA
- Posts
- 1,389
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Problem with .shtml page template
I am trying to set up an .shtml page template that uses one standard_header_1.inc and one standard_footer_1.inc. The standard_header_1.inc has a <BASE HREF="http://www.kripalu.org> tag in the <HEAD></HEAD> section.
The test_page_1.shtml sees the standard_header_1.inc fine, but does not see the standard_footer_1.inc.
http://www.kripalu.org/programs/yoga...t_page_1.shtml
I wonder if it is because the <BASE HREF> tag is in the first include and not, of course, in the second? Does anyone know about and have a fix for this?
The test page HTML is:
<!-- test_page_1.shtml -->
<!--#include virtual="../../includes/standard_header_1.inc"-->
<h1>This is test content on test_page_1.shtml.</h1>
<br><br><br><br><br><br>
<!--#include virtual="../../includes/standard_footer_1.inc"-->
-
May 29, 2002, 11:08 #2
- Join Date
- Jan 2001
- Location
- Lawrence, Kansas
- Posts
- 2,066
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It's definitely nothing to do with the base href tag - that acts as an instruction to the client browser but is completely ignored by the SSI parser. Check that the footer file exists in that directory with that name and/or view the HTML source of the page to see if anything is being included and see if you can spot the problem that way.
-
May 29, 2002, 12:14 #3
- Join Date
- Jul 2000
- Location
- Western Massachusetts, USA
- Posts
- 1,389
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
standard_footer.inc is in the right directory.
In the source view of the browser, the only text that exists where the standard_footer.inc should be is:
[an error occurred while processing this directive]
-
May 29, 2002, 12:32 #4
- Join Date
- Jan 2001
- Location
- Lawrence, Kansas
- Posts
- 2,066
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Very odd
Could you post the contents of the standard_footer.inc file? There might be something in there that is breaking.
-
May 29, 2002, 13:09 #5
- Join Date
- Jul 2000
- Location
- Western Massachusetts, USA
- Posts
- 1,389
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yep. Here it is:
<!-- standard_footer_1.inc -->
<p>This is a test of standard_footer_1.inc.</p>
</BODY>
</HTML>
-
May 29, 2002, 13:18 #6
Why not make it an html file instead of an inc?
And btw you can use all html extensions by modifying your htaccess file.
-
May 29, 2002, 15:58 #7
- Join Date
- Oct 2000
- Location
- Nashvegas Baby!
- Posts
- 7,845
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Geiger...
There can be problems using an HTML file as an include. It's best to get it it's own file extension. When I do includes (SSI, CFM or PHP) I tend to use .inc or .ssi. This allows the included files to stand out from other files and makes them easier to identify.Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes
-
May 29, 2002, 16:10 #8
- Join Date
- Mar 2002
- Location
- Ecosse
- Posts
- 398
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by paulcj2
<!-- standard_footer_1.inc -->
<p>This is a test of standard_footer_1.inc.</p>
</BODY>
</HTML>
"If something is too hard,give it up. The moral my boy is too never try anything"
"Just because I don't care doesn't mean I don't understand"
-
May 29, 2002, 16:50 #9
First of all, what type of problems? I have absolutely none.
rabmurdy, I think you can structure them however you want. I did a bit of planning for mine, as I have a header and a footer. The structure of my pages is as follows:
<html>
<head>
<title></title>
<script></script> if needed, etc.
-----begin header.html
<script></script>
</head>
<body>
<td>
-----end header.html
content
-----begin footer.html
</td>
</body>
</html>
-----end footer.html
this works very well, because I can add templated head elements and individual-page head elements at the same time. I think it's the best way to structure it, and with a bit of balance you can add some opening and some closing tags, etc. to different files.
-
May 29, 2002, 18:38 #10
- Join Date
- Jul 2000
- Location
- Western Massachusetts, USA
- Posts
- 1,389
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks everybody for your ideas.
Geiger, you will get a kick out of this. I redesigned my test page and includes the way you do yours, and it I still can't get the footer include to work.
http://www.kripalu.org/programs/yoga...t_page_2.shtml
Here is my code:
1) test page
<HTML>
<HEAD>
<BASE HREF="http://www.kripalu.org/">
<TITLE>test_page</TITLE>
<!--#include virtual="../../includes/standard_header_2.inc"-->
<h1>This is test content on test_page_2.shtml.</h1>
<br><br><br><br><br><br>
<!--#include virtual="../../includes/standard_footer_2.inc"-->
2) Header
<!-- Begin Meta tags -->
<META NAME="keywords" CONTENT="kripalu yoga, yoga, yoga
teacher training, spirit, spiritual retreat">
<META NAME="description" CONTENT="Kripalu is the largest center for yoga and holistic health in the US, serving people of all backgrounds for more than 20 years.">
<!-- End Meta tags -->
</HEAD>
<BODY>
3) footer
<p>This is a test of standard_footer_2.inc.</p>
</BODY>
</HTML>
Whaddayathink?
-
May 29, 2002, 19:02 #11
If you want to give me credit, change all extensions to .html and add:
AddType text/x-server-parsed-html .html
to your .htaccess file.
Then we'll see if it works
-
May 29, 2002, 19:46 #12
- Join Date
- Jul 2000
- Location
- Western Massachusetts, USA
- Posts
- 1,389
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Not sure how to do the .htzccess file on a hosted server.
-
May 29, 2002, 20:08 #13
Create a text file with:
AddType text/x-server-parsed-html .html
in it.
Upload it to your main directory and then rename it to ".htaccess"
If you can't figure out how email me at info@4netdesign.com with your FTP info and I'll do it for you.
Bookmarks