Results 1 to 4 of 4

Thread: Server Side Include Navigation Help Needed

  1. #1
    Join Date
    Jul 2006

    Server Side Include Navigation Help Needed

    Hi All,

    I am using Server Side Includes for the website I am designing. I am using asp. What I would like to know is if you can affect the navigation (the nav. is a .htm file included in an .asp page) based on the asp page that the user is viewing. What i would like to do is indicate to the user what page they are viewing. I know how to do this utilizing css id's, but i don't know how to do it when the navigation is an included file. Can anybody point me in the correct direction? The site i am very slowly developing is going to be huge, and i want to make this as easy on myself as possible...

    I'd appreciate any help at all, especially some direction to good references - online or otherwise.

    Thank you!


  2. #2
    Join Date
    Jan 2003
    Dundee, Scotland
    create a session variable on your page before you include the file. In the inculde file you can then retrieve the session variable.

    On each page:
    Session("Page") = "Home Page"

    In the inculde file:

    thePage = Session("Page")

    If thePage = "Home Page" Then
    ' show this navigation
    ElseIf thePage = "Products Page" Then
    'show other navigation
    End If

  3. #3
    Join Date
    Jul 2006

    Thanks for responding! I appreciate it! i thought it would involve an if/then statment, but i wasn't sure, and it has been a very long time since i've dealt with if/then statements at all...

    I am still a little unclear on a couple of things.
    My first question is where exactly do i put the session variable in the code on the .asp page.
    My second question is where exactly do i put the if/then statement within the include.htm file?
    My third question is how do i state it if i'm using an id within the link code (or list code - i have navigation set up both ways on the site i'm working on) to indicate that the id should move from Link A to Link B when the user is viewing a certain page.

    Does that make sense to you? The website i'm working on is VERY involved. it actually has primary, secondary and tertiary navigation. as i have the site set up right now, that primary is the only navigation that is set up as an include statement, and i don't have any indication to the user what page they are viewing.

    Thanks for any help you can give me!!


  4. #4
    Join Date
    Jul 2006
    Can anybody help me with this?? I've done some research on this suggestion of using session variables, but i must not be looking in the right place b/c i haven't been able to make anything work...

    Please, please help!!


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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