How do I implement footer.php or footer.html in index.html ?

Discussion in 'HTML & Website Design' started by NicknameJustin, May 4, 2008.

  1. #1
    Hello html pro's.

    How do I insert the footer.php or footer.html into the index.html ?

    I guess that it's similar to the theme in the wordpress.org ?:
    <?php get_footer(); ?>
    Code (markup):
    Do I have to include something in style.css? If yes, what should that be?

    So I guess that I save the codes for the footer in:
    footer.html or footer.php ?

    Please be descriptive with details, like an example of the whole site,
    like:
    <head>
    style7 #my foot
    </head>

    <body>
    include footer.what
    stop include footer.what
    </body>

    or whatever it looks like.

    Thanks a lot!
    Justin
     
    NicknameJustin, May 4, 2008 IP
  2. PHPGator

    PHPGator Banned

    Messages:
    4,437
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    260
    #2
    index.php should be:

    <html>
    <head>
    // Include your stylesheet and stuff here
    </head>
    <body>
    
    blah blah blah content
    
    <?php include('footer.php'); ?>
    Code (markup):

    footer.php should be anything you want to include on every page. Probably at least:

    </body>
    </html>
    Code (markup):
     
    PHPGator, May 4, 2008 IP
  3. ourblink

    ourblink Peon

    Messages:
    25
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    include TAG not allowed at HTML extension
    You should to rename index.html to index.php
     
    ourblink, May 5, 2008 IP
  4. NicknameJustin

    NicknameJustin Active Member

    Messages:
    49
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #4
    Thank you PHPGator and Ourblink.

    Half job done. Thanks! That's very useful for the .php sites.
    How do I do this in .html?

    You say that "include" are not allowed in .html?
    There must be some general stuff for this.
    It takes forever to edit 100 .html-files (search and replace) instead of just edit a footer, sidebar or header.

    Thanks,
    Justin.
     
    NicknameJustin, May 5, 2008 IP
  5. ourblink

    ourblink Peon

    Messages:
    25
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yes, Include is only PHP,
    No way there ...
     
    ourblink, May 5, 2008 IP
  6. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #6
    nicangeli, May 5, 2008 IP
  7. pradeep.balua

    pradeep.balua Active Member

    Messages:
    415
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #7
    just before closing the body tag include the footer.
     
    pradeep.balua, May 6, 2008 IP
  8. NicknameJustin

    NicknameJustin Active Member

    Messages:
    49
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #8
    Thanks again ourblink, and nicangeli and pradeep.balua

    So I'm guess that I'm overdoing it here.

    Probably there's an easy command in Dreamweaver, like "insert global menu" or "insert menu" that allows me to update all menus within a domain from one menu. (How do I do that if possible?)
    This might be obvious for someone else, but as self-teached you miss something sometimes.

    Regards,
    Justin.
     
    NicknameJustin, May 6, 2008 IP