dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: Menu generation

  1. #1
    Join Date
    Nov 2009
    Posts
    7

    Menu generation

    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?

  2. #2
    Join Date
    Sep 2008
    Location
    Mexico
    Posts
    786
    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 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?
    Last edited by opifex; 11-30-2009 at 01:44 AM.

  3. #3
    Join Date
    Nov 2009
    Posts
    7

    Menu generation

    Quote Originally Posted by opifex View Post
    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.
    Last edited by trenoweth; 11-30-2009 at 06:19 AM.

  4. #4
    Join Date
    Nov 2009
    Posts
    7
    Quote Originally Posted by opifex View Post
    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.

  5. #5
    Join Date
    Sep 2008
    Location
    Mexico
    Posts
    786
    As long as you got it working!
    Enjoy!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles