Thread: site navigation

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    USA
    Posts
    226
    Rep Power
    14

    site navigation


    I am looking for opinions on this question. I have a huge site built for a large corporation. It has hundreds and hundreds of pages. I am looking for an easy way to implement a navigation scheme that will be easy to maintain. I don't want to have to go to every page that a link resides to change the link.

    I have come up with two ways to do this. I don't know if these are the best solutions.

    1. Run the navigation through a database. The database would have to have a table for primary, secondary, tertiary and quaternary nav. It would probably have to call to the database four times. Once for each level of navigatoin and display based on relationships between tables. The relationships would be established with id numbers. This could be problematic because "at" and "off" conditions of the navigation would be driven based on the id variables passed through the querystring. If someone just entered a url manually without the variables attached, they could get a page where the navigation does not display correctly.

    2. Use an array to store the navgation. The problem that I can see with this is that I would have to loop through the array several times to display the different levels of navigation based on relationships between elements in the array.

    Is there a better way to do this? Am I way off here? I just want something easy to maintain and that will work no matter what the user does.

    Thanks for sharing.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    138
    Rep Power
    12
    I think your looking for a silver bullet.

    Silver bullets do exist but rarely kill ware wolves because they may be silver but they are not magic!

    If you find the answer to your problem you'll be rich!

    The only real suggestion I can make that will help (without using too much brain power and time) is to suggest you investigate URL rewriting. The appache webserver has a mod call url_rewrite or something that allows you to convert your internal ugly url with query string parameters from

    http://www.mysite.com/pagex.asp?section=7&page=6&item=5

    into

    http://www.mysite.com/accounting/intro/index.htm

    Then you never have to have the user sumitting page=-1 and getting an error because they dont know that page=x is valid.

    There are some ActiveX components that allow the same thing for the IIS and ASP

    You could also generate you html at design time from a database and server static html instead of serving dynamic database driven html.

    Thats my 2 cents worth.
    --

    ngibsonau
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    USA
    Posts
    226
    Rep Power
    14

    solution


    Thanks for the input. Here is what I have decided to do. I am going to run the navigation out of a database:

    link level1 level2 level3 section

    primarylink1 1 0 0 aboutus
    primarylink2 2 0 0 aboutus
    secondarylink 2 1 0 aboutus

    I can pull stuff out of the database by section and sort by level1, level2, level3. I can check the link with Request.ServerVariables("SCRIPT_NAME") to see if they are the same. If they are, I will have my at condition. If they aren't it will show up in the off condition.

    I will have to build an admin tool to add, modify and delete navigation links. If I add a link that goes between two existing links in the order of things, I will bump up the the sort number for the links that go after it and insert the new link.

    That should take care of what I am looking to do. This site has hundereds of pages. I am sick of having to modify 20-30 pages at a time when they decide to add a link. This should make things easy.

IMN logo majestic logo threadwatch logo seochat tools logo