Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6

Thread: calling a table

  1. #1
    Junior Member
    Join Date
    Dec 2005
    Posts
    13
    Member #
    12175
    Im making a standard html website. Is their a way for me to make my main navigation table a seperate file and have it displayed on every page?

    The problem is, my site is going to have over 100 pages. And I would like to be able to administer the menu table easily, rather than editing 100 pages..

    Thanks

  2.  

  3. #2
    Senior Member glyakk's Avatar
    Join Date
    Nov 2003
    Location
    USA
    Posts
    1,263
    Member #
    3828
    Liked
    6 times
    First thing you have to do is see if your host allows you to do this. In all likleyhood, it is guarenteed that they will in at least some form. The easiest in your case might be using Server Side Includes. They dont require any sort of server side language like PHP or ASP or any amount of heavy coding like Perl scripts.

    All you have to do is take the html that you would use for your menu and put it in a seperate file, named something like menu.html. then where you want to include that html in your pages you put this bit of code..
    HTML Code:
    <!--#include virtual="menu.html" -->
    Of course this assumes that menu.html is in the same directory as the page you want to include it on, if not, you will need to specify the path to your menu.html file.

    For more information, check this page out.
    http://httpd.apache.org/docs/1.3/howto/ssi.html


  4. #3
    Junior Member
    Join Date
    Dec 2005
    Posts
    13
    Member #
    12175
    thanks for the reply

    Will the search engines still consider the menu as part of the page? Asking because the menu will have a few of my main keywords as menu titles.

  5. #4
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    In the example above, the contents of the file "menu.html" will be copied into your page's output. It will be as if it was there to begin with, so it makes no difference to search engines.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  6. #5
    Junior Member
    Join Date
    Dec 2005
    Posts
    13
    Member #
    12175
    great, I got it to work. thanks.. got another question though..

    All my webpages are .htm extentions. I would like to keep it that way instead of changing all of the extentions to .shtm . How can I go about this? I heard somthing about a .htaccess file. But I do not have one. Can I just add one? And what are the commands?

  7. #6
    Senior Member glyakk's Avatar
    Join Date
    Nov 2003
    Location
    USA
    Posts
    1,263
    Member #
    3828
    Liked
    6 times
    An .htaccess file is simply a file that you would use to pass special instructions to apache. Creating one is very simple. In any text editor make a file named .htaccess and put this inside it and put it where your pages reside on your server. Usually this is right inside your htdocs filder or any folder where you have pages that you want parsed.
    Code:
                AddType text/html .html
                AddHandler server-parsed .html
                AddHandler server-parsed .htm
    Make sure your text editor did not ad an extention to the file, make sure its is named .htaccess exactly.

    Edit: http://www.javascriptkit.com/howto/htaccess.shtml



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:40 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com