Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Accessing Menubar source code across numerous pages  (Read 3320 times)

0 Members and 1 Guest are viewing this topic.

generalfault

    Topic Starter


    Starter

    Accessing Menubar source code across numerous pages
    « on: July 28, 2009, 08:08:22 AM »
    Alright, here is my situation.  I have created a website with a menubar across the top of each page.  I want to be able to have the menubar code in a separate HTML file and have each other page access that page so I only have to change the code on one page when I have to update the menubar and not 30 other pages.  The only way that I have been able to find to do this is by setting up an SSI file.  Unfoprtunately that requires me to change my pages to SHTML files and change some settings on the server.  This is something I am not familiar with enough to do.  Is there any other simple way to do this?  I am stuck.

    kpac

    • Web moderator
    • Moderator


    • Hacker

    • kpac®
    • Thanked: 184
      • Yes
      • Yes
      • Yes
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 7
    Re: Accessing Menubar source code across numerous pages
    « Reply #1 on: July 28, 2009, 08:24:30 AM »
    Not using simple HTML, no.

    You can use PHP, which is probably the best solution.
    You would have to change all of your Webpage's extensions to .php instead of .html.

    It's quite simple from there.

    generalfault

      Topic Starter


      Starter

      Re: Accessing Menubar source code across numerous pages
      « Reply #2 on: July 28, 2009, 08:26:08 AM »
      And doing that would make it so I wouldn't have to change any server settings?

      kpac

      • Web moderator
      • Moderator


      • Hacker

      • kpac®
      • Thanked: 184
        • Yes
        • Yes
        • Yes
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 7
      Re: Accessing Menubar source code across numerous pages
      « Reply #3 on: July 28, 2009, 08:28:16 AM »
      And doing that would make it so I wouldn't have to change any server settings?

      Oh yea. Nothing to do with the server.

      Once you have all the files renamed, it involves adding about 3 lines of code (to every page) to display the whole menu on every page.

      generalfault

        Topic Starter


        Starter

        Re: Accessing Menubar source code across numerous pages
        « Reply #4 on: July 28, 2009, 08:30:50 AM »
        Alright, sounds good.  I'll do some research into Php now.  At least I have a little direction now.  Thank you.