SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,381
    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"-->
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  2. #2
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,067
    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.

  3. #3
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,381
    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]
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  4. #4
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,067
    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.

  5. #5
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,381
    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>
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  6. #6
    SitePoint Wizard geiger's Avatar
    Join Date
    Jul 2001
    Posts
    2,459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why not make it an html file instead of an inc?

    And btw you can use all html extensions by modifying your htaccess file.

  7. #7
    SitePoint Wizard creole's Avatar
    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

  8. #8
    Alt+F4= User Control ;-) rabmurdy's Avatar
    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>
    I thought you weren't allowed to have <body><html> tags in the include file, as they are already present in the file thats calling?

    "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"

  9. #9
    SitePoint Wizard geiger's Avatar
    Join Date
    Jul 2001
    Posts
    2,459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  10. #10
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,381
    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?
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  11. #11
    SitePoint Wizard geiger's Avatar
    Join Date
    Jul 2001
    Posts
    2,459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  12. #12
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,381
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure how to do the .htzccess file on a hosted server.
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  13. #13
    SitePoint Wizard geiger's Avatar
    Join Date
    Jul 2001
    Posts
    2,459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •