Navigation Bar issues

Discussion in 'Web Design and Development' started by Macman1993, Jun 17, 2009.

  1. Macman1993 macrumors 6502

    Macman1993

    Joined:
    Nov 23, 2007
    #1
    I am about to start a site that when done will have a bunch of pages. Of course it needs a navigation bar on each page so you can navigate the website easily. I made a nav bar using some css styles and adding links to a page that give it the appearance of a well built nav bar. After finishing it I realized a big problem, what if in the future I want to add something into the nav bar? I know how to do it on each page but thats the problem I don't want to have to go to every page and adding the new link. Their is obviously a way to have a nav bar that you can edit in one file and it changes on every page with that nav bar (unless you want to tell me that when apple adds things to its nav bar they update every single page on their website by hand which I tend to doubt) i'm not sure if I am making any sense here but if anyone of you know what I can do to solve my problem please tell me and I made no sense please say and I will try and clarify what I want.

    P.S I do not use iWeb I will use my own web host and will be able to type any kind of code needed.
     
  2. iMasterWeb macrumors regular

    Joined:
    Mar 15, 2009
    #2
    Sorry..but your out of luck :(

    Well, this is one of iWeb's flaws. What you want to do is not possible. However, if I may make a suggestion, you could organize your site into pages within pages. So that you have however many main pages that all of the other pages fall into that way you only need one nav bar. And then on each of the main pages you would just add a link each time you make a new page.
     
  3. Macman1993 thread starter macrumors 6502

    Macman1993

    Joined:
    Nov 23, 2007
    #3
    I don't use iweb this site will have its own domain and all the html and css will be written by me.
     
  4. Cabbit macrumors 68020

    Cabbit

    Joined:
    Jan 30, 2006
    Location:
    Scotland
    #4
    All nav bars follow the same principles and usually use PHP to insert a class on the li of the active page.
    Mine is currently tab based though i have not worked on my project for a few weeks due to sickness and the project is only 1-2% finished.
    http://development.abcomforts.com/ you can take a nose at it in action then download the source code http://development.abcomforts.com/sourcecode.zip and see how it works.
    I use a php template engine to style the pages and htaccess rewrite to make clean urls.
    The code bar the login system is opensource for you do do with as you please though it is dreadfully messy just now while i am cleaning it all up.
     
  5. Cabbit macrumors 68020

    Cabbit

    Joined:
    Jan 30, 2006
    Location:
    Scotland
    #5
    What you are suggesting is iframes, please never ever ever suggest those horrid things again.
     
  6. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #6
    There's two common ways that you can choose from depending on what your support host. You can use PHP includes that contain your navigation. The second option is Server Side Includes (SSI). So depending if your host supports either of those technologies you can use them.

    The old fashion way was to use frames, but they are much less friendly and less accessible, and iframes are better suited when including content from other sites so don't bother with that type of solution. I use PHP includes myself for keeping a consistent header, navigation, and footer.
     
  7. iMasterWeb macrumors regular

    Joined:
    Mar 15, 2009
    #7
    No I'm not..I'm simply suggesting better organization. There would be <INSERT NUMBER OF MAIN PAGES HERE> in the nav bar and then other pages would simply be links on those main pages. No iFrames needed
     

Share This Page