Click to See Complete Forum and Search --> : Menu generation
trenoweth
11-29-2009, 04:56 PM
I have been searching to see if I can find a CSS script that will allow a page to display a menu with data from another page. I.e I want to have just one place to enter the data that can then be published in several other pages. Then just one amendment would be required to change the menu in several pages.
I haven't been successful so far and wondered if anyone else knows of a suitable script?
opifex
11-30-2009, 12:37 AM
CSS = Cascading Style Sheet
CSS handles how the html "looks" in a browser - the "style".... it isn't a scripting language.
To make a menu that is "reusable" just use html and include the "menu" in all the pages of the site... I do mine using php includes, but a cgi include (ssi) works just as well.
This is an example of a re-usable menu (http://cafezas.com.mx/examples/NavExample01/index.html) that indicates the page you are on. The page location is done with CSS and the menu is an embedded php include that is just html saved in an inc file.
Are you working with a specific server-side language already?
trenoweth
11-30-2009, 04:56 AM
CSS = Cascading Style Sheet
To make a menu that is "reusable" just use html and include the "menu" in all the pages of the site... I do mine using php includes, but a cgi include (ssi) works just as well.
Many thanks for your response, I have just studied your example.
I'm afraid it doesn't do what I would like to achieve. I would like to have all the links on an external style sheet page which is then called by the use of, in this case, your <body id="index"> tag.
Are you working with a specific server-side language already?
No, just using raw HTML. What I am actually doing is re-writing some pages for someone else who has long navigation menus and if possible doesn't want to use frames as that produces a scroll bar between the navigation menu and the main frame. As far as I am aware I can use SSI on the server concerned.
As there is a very long navigation menu on the site the idea is to be able to amend just one page, not have to amend every individual page, as and when a change is required.
I have the feeling that it can't be done though.
trenoweth
11-30-2009, 09:59 AM
I do mine using php includes, but a cgi include (ssi) works just as well.
Thanks, I have gone down the SSI route and now it is doing *exactly* what I want it to do.
opifex
11-30-2009, 10:12 AM
As long as you got it working!
Enjoy!