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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Question regarding web site menu

    Hi,

    I have to upgrade old web site, the one big problem is menu on the right side.

    It has at least 20 menu buttons - pages, and when they need to do simply update, they need to update each (20) pages.

    I would like to put something, which will remove that each page has it's own menu, something like single file to update and that will reflect to all pages.

    What is the best thing to do, can you give me some directions, links, or any help.

    I can provide more info, just let me know.

    Thanks

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    What is the best thing to do, can you give me some directions, links, or any help.
    Write the html code for your menu in a file, say menu.htm or menu.txt and then include this file wherever required using a server side script, say in PHP
    PHP Code:
    <div id="sidebar">
    <?php
    include "menut.txt";
    ?>
    </div>
    Last edited by abduraooft; 05-26-2009 at 10:29 AM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    May 2009
    Posts
    74
    Thanks
    0
    Thanked 7 Times in 7 Posts
    Quote Originally Posted by dejansoftware View Post
    Hi,

    I have to upgrade old web site, the one big problem is menu on the right side.

    It has at least 20 menu buttons - pages, and when they need to do simply update, they need to update each (20) pages.

    I would like to put something, which will remove that each page has it's own menu, something like single file to update and that will reflect to all pages.

    What is the best thing to do, can you give me some directions, links, or any help.

    I can provide more info, just let me know.

    Thanks



    You can write your menu code in one seperate file (and name it, e.g, menu.php) and include it in all the 20 pages simply with the following code:

    <?php include("menu.php");?>

    So, every time you make changes on the menu.php file it will reflect on each and every pages.


    Regards.


  •  

    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
    •