Help!!!

Discussion in 'HTML & Website Design' started by Scott McC, May 29, 2008.

  1. #1
    At the moment I'm not using CSS, I've just started teaching myself, so I'm just using basic HTML for now. Does anyone know an easier way of changing the navigation bar on my pages when I add or remove something, at the moment I'm having to got through every page and replace the bar.
     
    Scott McC, May 29, 2008 IP
  2. scutari

    scutari Peon

    Messages:
    431
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    please be more accurate and tell what is the problem?
     
    scutari, May 29, 2008 IP
  3. Normac

    Normac Peon

    Messages:
    40
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    2 ways.

    1: Learn CSS :D

    2:

    A) Make sure you have PHP your server (Most have it installed)

    B) Create a file called sidebar.html Fill this with your sidebar info.

    C) Go into every page and replace the sidebar code with the following (Note if the sidebar.html is not in the same place as the HTML file you are editing, you need to change sidebar,html with whatever folder it is in)

    
    <? php
    include ("sidebar.html");
    ?>
    
    Code (markup):
    D) Go into your .htaccess file and add the following code (This allows PHP code to work on .html files, else you would have to change every single link on your website, something I guess you wish not to do.)
    
    AddType application/x-httpd-php .html 
    AddHandler x-httpd-php .html 
    
    Code (markup):
    The following should work on most hosting providers. Now just update sidebar.html with any new sidebar code and it should change every page.

    Hope this helps.
     
    Normac, May 29, 2008 IP
  4. Scott McC

    Scott McC Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thx alot Normac, I'm currently teaching myself CSS and am starting a course in October, but until the I'll give your second option a try, may thx :) and scutari I can't think how much more detail I could give. I metioned the problem was I needed a easier way to change the nav bar, when I put someting onto it or took something away I'd have to go through every page on my site and change the current one. But Normac has answered it, so I'll give what he said a try. :)
     
    Scott McC, May 29, 2008 IP
  5. mahendras

    mahendras Peon

    Messages:
    597
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If you know a bit of Dream weaver, You can do it by making dream weaver template and applying it on all pages.
    So whenever you do changes in template and apply changes, they will be applied on all pages using the template.
    This may help.

    http://livedocs.adobe.com/dreamweav...m?context=Using_Dreamweaver&file=12_tem21.htm


    Or other simplest way if you are a beginner.
    Use Iframe tag. <iframe src=yourmenufile.html></frame> use this on all pages.
    So whenever you make change in menufile, that will reflect on all pages.
    http://www.w3schools.com/TAGS/tag_iframe.asp
     
    mahendras, May 29, 2008 IP