Results 1 to 2 of 2

Thread: Menu and navigation

  1. #1
    Join Date
    Jul 2008
    Location
    Lake Tahoe, California
    Posts
    11
    Thanks
    20
    Thanked 0 Times in 0 Posts

    Question Menu and navigation

    Greetings master coders...

    I am tired of searching for something the eludes me. I may have in idea what I want to do is only available as a PHP item, but before I stop looking I will finally ask.

    I want a menu / navigation that I only have to code once (as you know, you used to do this with frames by keeping on frame static with all the menu links and the other frame with the content, now that frames are out, I tried iframes, not working like the old frames did)

    It is not a matter of reloading the menu every time. That has never been an issue.
    the reason I only want one menu to have to write is changing 140+ pages with the menu in it when I create a new menu item or change one.

    If it were just one menu to change and it loads for all pages (like frames used to) then that is what I am looking.

    PHP? someone mentioned AJAX (looked at it and did not fit the needs), javascript? Looked at a few of those and I understand javascript is just as bad as frames?

    anyone with an idea? anyone doing this now? I see it on many sites, and look at the code, but there is alot going on, either Javascript or ???

    and no. I will not do druple or joomla.

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    PHP, or some other server-side script would be your best option. There are JavaScript solutions to this, but they're buggy and unreliable at best (not to mention inaccessible).

    Here is a small tutorial on creating PHP templates. In short though, all you would do is code your menu, add it to it's own .html page (for example, menu.html) and then "include" it into your main PHP page. "Include"ing means:

    Code:
    <?php include('menu.html'); ?>
    You would have to rename all of your pages with the .php extension for this to work, however. Or do some .htaccess magic and instruct your server to parse HTML as if they were PHP.

  3. The Following User Says Thank You to Medyman For This Useful Post:

    Maynard (10-29-2008)

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
  •