-
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
-
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
-
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).
-
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