Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jul 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Same Menu on Multiple Pages

    OK, this may have been discussed elsewhere, but I can't seem to find it, so here goes. What I have is a simpel css menu. In the header, I obviously have the css and js files linked to and operating correctly. In fact, my site runs fine the way it is, but when i edit one of the menu entries in the body of the html code, i currently have to edit the entire site, going from page to page copying and pasting the new menu. is there a way so that i can have the menu in a single file and what all has to be in taht file?

    below is what's in the header:
    Code:
    <link rel="stylesheet" type="text/css" href="css-js/anylinkmenu.css" />
    
    <style="text/css">
    </style>
    
    <script type="text/javascript" src="css-js/anylinkmenu.js">
    
    /***********************************************
    * AnyLink CSS Menu script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    </script>
    then I have my menu obviously in the body section. just thought an idea of the layout might help give an idea of what i want.

  • #2
    New Coder
    Join Date
    Apr 2005
    Posts
    95
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My suggestion would be, convert all your files to php documents ( instead of index.html, index.php ) then once thats done, copy your "menu" code into a single php document called "menublah.php" or whatever. Then in place of your menu code on all those pages, replace with....

    PHP Code:
    <?
    include('menublah.php');
    ?>
    should work. enjoy.

  • #3
    Senior Coder JamieR's Avatar
    Join Date
    Oct 2004
    Location
    United Kingdom
    Posts
    3,161
    Thanks
    0
    Thanked 5 Times in 5 Posts
    If your server doesn't support PHP you can probably do it with SSI....

  • #4
    New Coder
    Join Date
    Jun 2005
    Location
    London
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Or if you use a dreamweaver type program you could use library items.
    Never argue with an idiot.
    They just drag you down to their level...
    ...and beat you with experience.


    -----------------------------------------

    That which is static and repetitive is boring.
    That which is dynamic and random is confusing.
    In between lies art.


  •  

    Posting Permissions

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