+ Reply to Thread
Results 1 to 4 of 4

Thread: Include a Template file in a HTML file
      
   

  1. #1
    jjmao1 is offline Sergeant
    Join Date
    Apr 2007
    Posts
    31

    Question Include a Template file in a HTML file

    All my pages are static HTML pages now. I have to modify every file if I want to change head, footer, navigation menu, etc. I want to create a template file in in either template.php or template.html and I can call this template file from each HTML file. I want to keep my HTML file names and don't lose all search engine index, backlinks, and bookmarks, etc.

    Anyone has done this successfully? Can you tell me how did you do it?

  2. #2
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default Re: Include a Template file in a HTML file

    Only way I can see doing this with bluevoda is by making all of your pages .php, and using the include() function to include your website template.

    Naval has a tutorial on doing this with a menu, I don't see why this won't work with everything but the content. You will have do use the method of making certain parts of the page a function, if you include the entire file the page won't turn out right (two pages with all the html jumbled isn't going to turn out well)

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

  3. #3
    jjmao1 is offline Sergeant
    Join Date
    Apr 2007
    Posts
    31

    Default Re: Include a Template file in a HTML file

    I have tried this method. It works fine. But I don't want to change all the files from .html to .php. In that case, I will have to lose all the page index, backlinks, bookmarks, etc. I can get index from major SEs quickly, but not other things. If I redirect all the files from .php to .html, I am afraid my Adsense account will get banned.

    Black Panther Animal
    PBS Kid Games

  4. #4
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default Re: Include a Template file in a HTML file

    HTML isn't a dynamic language. There is no way to dynamically include a template with HTML. The closest you can get is using a frame or iframe. Using frames would be even more detrimental to you search indexing then changing your extensions to .php would.

    There is a way to do extension masking with .htaccess (so you can make a .php load as a .html (server still excutes as .php, but it shows in the address bar as .html), I don't know the code offhand, but I'm sure it would come up in a google search

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49