SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Menu

  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Menu

    Hi All

    At present I have got my menu (horzontal bar) in every single page, which means if I have to update it, then a real pain.

    I am sure there is a way of loading the menus centrally from a CSS but then what about all the Java script as welll, can that all be loaded also?

    Any pointers would help.

    Explorer

  2. #2
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What type of menu?

    You could use server side includes. Once you create your menu as an include, you can then update the menu in a central file and the menus on all pages will be updated. Also means that you don't have to reload every page to the server, only the include. Do a google for "serverside include" or SSI.

    As for the JS, you can move that to an external js file and call the file into the head of the document, pretty much like you call in the stylesheet. PS: Hopefully you haven't built a menu that hides your links inside the javascript itself, these are not very good for search engine placement. A good menu should have the links in the html itself for the spiders to find them.

    Nadia

  3. #3
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not only is it bad for search engines, but it's also bad for accessibility as well.

    I suggest you (like Nadia said) go with either server-side includes or a server-side programming language's include function (like PHP).

  4. #4
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Thanks for the responses.

    The menu is simply the site navigation menu, I used a package to generate that. As for server side language I am using PHP with MYSQL backend.

    If anyone has a sample in PHP for writing SSI that holds menu bars I would be greatful

    Regards

    Explorer


Bookmarks

Posting Permissions

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