Results 1 to 10 of 10

Thread: Menu help

  1. #1
    Join Date
    Aug 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Menu help

    My site has a menu running horizontal. It is presently inside each html file. I want to take the menu out of every page so I can save pace and ultimately edit it without having to update 50+ pages manually.

    Can you help?

  2. #2
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    sounds like a job for PHP to me... You could just have an "include" in each page which would include the menu, then you could edit the menu directly and the changes would be apparent in each page.
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  3. #3
    Join Date
    Aug 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    So how would I need to format the two files?

    Do I just put the include in place of the menu in each html? What would I include?

  4. #4
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    Make a php file, put all the menu source code in it, then save it as "menu.php" or something to that effect. Then use an include() to show that file in that particular area of each page.

    You can read more about includes below:

    http://www.w3schools.com/php/php_includes.asp
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

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

    Default

    It doesn't have to be another PHP file that you include. It can be HTML (or a text file). Of course, it makes no difference in this case.

    What's important is that the file in which the include is going into be renamed with a .php extension.

    Also, be aware that the entire file will get "included". So, only but the code related to the menu. Don't include any other <head> or <body> etc.. tags.

  6. #6
    Join Date
    Aug 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Have been unable to get it working following the instructions on the websites listed above. Not sure if I have got everything installed properly to run php stuff.

    With that in mind I have now edited one of 'mouseovertabs.js' as available from this site. I have cut down as much of the JS as possible given my none scripting background. I now have a working menu in my pages that is loaded from a single file. I can now make changes to just one file and apply it across the entire site in one go.

    PS I have left the reference to this page at the top of the JS file.

    As I am not from a scripting background is there anyone on here who can have a look at the file to remove any parts that are unused so as to reduce size of the file?

  7. #7
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    Sorry you couldn't get the include() working, but glad to hear you were able to come up with some sort of solution. Would you mind posting your results for us to see?
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  8. #8
    Join Date
    Aug 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    What would you need me to upload and how?

  9. #9
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    well, for us to be able to view the finished product, you would need to upload the page (pages) that you want us to see, plus all the images, scripts, css, and so forth.
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  10. #10
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    It's not a MUST however, I was just wondering if you would mind if we could see the end result.
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

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
  •