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 8 of 8
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Posts
    157
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Adding a menu link without having to edit all pages?

    I wanted to know if there is a way to add a link to nav menu without having to edit all the page. Could it be possible with using CSS style? Thanks

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    hmmm... don't think so... CSS is for style, so you could, say, change the appearance of the navigation without having to edit all your pages, but not add a link. You could try frames or server side includes .

    -Rich

  • #3
    Super Moderator sage45's Avatar
    Join Date
    May 2002
    Posts
    1,060
    Thanks
    0
    Thanked 13 Times in 13 Posts
    One of two ways that you can accomplish this:

    1. Make your website into a frame based website and use just one frame for the navigation...

    -or-

    2. Use a javascript file to generate the code that represents your menu and just reference the file on each page... i.e. -

    Code:
    <SCRIPT LANGUAGE="Javascript" SRC="blahmenu.js"></SCRIPT>
    -sage-
    HTML & CSS Forum Moderator

    "If you don't know what you think you know, then what do you know."
    R.I.P. Derrick Thomas #58
    1/1/1967 - 2/8/2000

  • #4
    Regular Coder
    Join Date
    Dec 2003
    Location
    USA
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by sage45
    2. Use a javascript file to generate the code that represents your menu and just reference the file on each page... i.e. -

    Code:
    <SCRIPT LANGUAGE="Javascript" SRC="blahmenu.js"></SCRIPT>
    -sage-
    This wouldn't be such a good idea, IMO, because users who do not have JS enabled will not see your navigation.

  • #5
    Regular Coder
    Join Date
    Sep 2002
    Posts
    157
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Hmmm, I think iframe is probably the only way to go without using CMS. Another way I know is using Dreamweaver templates but uploading all files required if template edited.

  • #6
    Regular Coder
    Join Date
    Dec 2003
    Location
    USA
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #7
    Regular Coder
    Join Date
    Sep 2002
    Posts
    157
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Right, it sounds simple using:

    <?PHP
    include "include.php";
    ?>

    I have tried using a link for more info but it shows server errors...so how can I use the code provided? Thanks

  • #8
    Regular Coder
    Join Date
    Dec 2003
    Location
    USA
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts
    1. Make sure your server supports PHP.
    2. Make sure the page with the include on it has a .php extension.

    Also, if your server doesn't support PHP, check to see if it supports SSI.


  •  

    Posting Permissions

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