1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question - HTML Sidebar

Discussion in 'HTML & JavaScript' started by carter7984, Oct 6, 2011.

  1. carter7984

    carter7984 Junior Member

    Joined:
    Aug 13, 2008
    Messages:
    109
    Likes Received:
    19
    Hi,

    I apologize in advance, I don't know how to really explain clearly what I am trying to accomplish, thats why I am posting here rather than searching Google.

    I have a site that runs HTML, (I've tried to change to WP, but the earnings decrease when I change it from HTML to WP). Its a pain in the ass each time I try to add a new page because I have to update EACH HTML file to update the sidebar with the new page URL. Is there any code that I can place on each page so it reads one single file that I update to have new pages? Does that make sense?

    Hope so. Thanks in advance for the help
     
  2. appman360

    appman360 Newbie

    Joined:
    Sep 21, 2011
    Messages:
    12
    Likes Received:
    5
    You could use php in the html files and use an include for the sidebar

    Add this in .htaccess
    Code:
    RemoveHandler .html
    AddType application/x-httpd-php .php .html
    then <?php include "sidebar.php" ?> in the html files

    hope that's what you mean
     
  3. theMHR

    theMHR Junior Member

    Joined:
    Apr 27, 2011
    Messages:
    124
    Likes Received:
    19
    Use PHP for this reason, as appman said. Make sure to change your URLs to .php but if you want them to be .html or .htm then try to use .htaccess and redirect .html to .phps . In this way your pages shown will be .html but they are basically accessing .phps