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
    15

    site navigation


    Does anyone know of a good solution for maintainable navigation? We are redesigning a huge site for a large energy company. This site has a ton of navigation links in the left menu. There are primary, secondary and tertiary levels. When you are on a particluar page, the navigation associated with it is in the "at" condition. I don't think I can use a menutree because each link goes to a different page.

    The only think I can think of doing is this:
    I was thinking about creating a navigation include for each main section of the site. This include would include every combination of primary, secondary and tertiary nav for that section. Each nav element would be called with variables passed through the querystring. The at and off conditions would also be called this way. However, it would be driven by a ton of if then statements.

    My goal is for the user to not have to update a bunch of pages each time the navigation scheme changes. They should be able to make one adjustment which effects the navigation throughout the site. Is there a better way to do this?

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

    Join Date
    Sep 2001
    Location
    NJ
    Posts
    428
    Rep Power
    17
    There is a way to do this without using asp and if you are willing to spend some $. If you set the site up in dreamweaver with templates then you can maintain the menu's and simply change the template file and all your menu's will change. There is also a product called contribute which is a stripped down dreamweaver for content editors without any HTML knowledge. You can set up all the styles and templates and allow them to add content and pages. Then you can still go into dreamweaver and update it.

    If you want to go the asp route then is the navigation going to be the same on every page? or will it be different. I didn't quite understand what you were saying. From what i can tell you want the menu item to look a little different based on what page you are on. If i were you i would make the a functino called makeMenu and pass in the current page. Then you can adjust that menu item accordningly. And it doesn't have to be tons of if/then statements. You can keep your menu items in an array and loop through the array, checking for the value that you passed in.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    USA
    Posts
    226
    Rep Power
    15

    thanks for the reply


    Thanks for your feedback -

    Dreamweaver is not an option. I have to go the ASP route. Your idea is good, however I really don't know how to implement an array for this situation.

    The navigation will apprear slightly different on each page. The navigation will be in an "at condition" when you are on that page. Typically this will be the link with a white background behind it. All navigation is textual. Also, depending on whether you are on primary, secondary or teritiary page, a different bullet will appear next to the navigation.

    Is it possible to determine which level of navigation (primary, secondary or tertiary) you are on for the background color and text color of the link, which bullet to place next to the link and how far to indent the link based on an array?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    USA
    Posts
    226
    Rep Power
    15

    nevermind


    Figured it out. Thanks for the suggestion.

    <html>
    <head>
    <title>Untitled</title>

    <%
    dim NavArray(5,1)
    dim id
    id = Cint(Request.Querystring("id"))
    if id = "" then
    id = 0
    end if

    For navcount = 0 to 1
    if navcount = id then
    NavArray(3,navcount) = "ffffff"
    else
    NavArray(3,navcount) = "cc0033"
    end if
    Next

    NavArray(0,0) = "link1"
    NavArray(1,0) = "array.asp"
    NavArray(2,0) = "primary"
    NavArray(4,0) = 0
    NavArray(0,1) = "link2"
    NavArray(1,1) = "array.asp"
    NavArray(2,1) = "primary"
    NavArray(4,1) = 1
    %>

    </head>

    <body>
    <table width="200" cellspacing="0" cellpadding="0" border="0">
    <% For i = 0 to UBound(NavArray, 2) %>
    <tr>
    <td width="200" bgcolor="#<%= NavArray(3,i) %>"><a href="<%= NavArray(1,i) %>?id=<%= NavArray(4,i) %>"><%= NavArray(0,i) %></a></td>
    </tr>
    <% Next %>
    </table>

    </body>
    </html>
  8. #5
  9. Second highest poster :p
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2001
    Posts
    7,322
    Rep Power
    33
    I personally would advise against ever going with the Dreamweaver templates since all it does is search and replace operations on the files. If someone later comes to edit the site and they don't have Dreamweaver you get problems, I would stick with a solution that works for everyone.
    - Andreas Koepke

    Koepke Photography

  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    USA
    Posts
    226
    Rep Power
    15

    yes


    I agree. I have come accross another problem.

    In my code above, I am setting the off and at condition based on a variable passed through the querystring. What if a user manually enters a url to a certain page without the variables? The navigation will look like you are on one page while the content is from another. Is there a way to do this without passing variable through a querystring so that will not happen?



    I know I know, if its not one thing is another.:

IMN logo majestic logo threadwatch logo seochat tools logo