Charting a path through a complex site

Results 1 to 3 of 3

Thread: Charting a path through a complex site

  1. #1
    Join Date
    Dec 1969

    Default Charting a path through a complex site

    I’m at the planning stage for an ASP site with about 100 pages (and growing), 3 to 4 levels deep and roughly pyramid shaped. It will be possible to get to nearly every page on the next level from every page above – generating a very large number of potential paths through the site.<BR><BR>I would like to display a text bar near the top showing where you are, how you got there and provide links back up your path. Something like:<BR><BR>home &#062; about us &#062; recruitment &#062; work experience<BR><BR>I’ve seen sites that do this and obviously it will have to be generated dynamically but I wonder if anyone has any experience of the best way to implement it. The idea of giving every single link on the site a querystring with data about the page it’s pointing to sounds like a maintenance nightmare. <BR><BR>I thought of having some global strPathName and a strPageName variable on each page and append the one to the other before serving the page – but I can’t see how to step backwards through that. <BR><BR>It could all get horribly complex - any one got any ideas?<BR>

  2. #2
    Join Date
    Dec 1969

    Default Hmm.. interesting question.

    I guess you could keep track of what level of the site a particular page is at.<BR><BR>Then, if you store an array in the session variable, you could update that particular location w/ the current page&#039;s URL and title.<BR><BR>Then, it&#039;s just a matter of looping through the array until you get to a blank.<BR><BR>-Doug

  3. #3
    Join Date
    Dec 1969

    Default RE: Charting a path through a complex site

    use a two dimensional array; the first dimension being the page description, and the second the href for the page. As you go onto the page below it, add the next page to the array and just response.write it. Here is the snippet of code I use. The subs I execute should be pretty self explanatory.. I store the page descriptions in a database, and call buildNavPath on the main include (which sends the current page name; Request.ServerVariables("URL"))<BR>sub buildNavPath(pstrSource)<BR> Dim intCount<BR> <BR> call setupStoredProc("getNavPath")<BR> call adoCmd.Parameters.Append(adoCmd.CreateParameter("@ filePath", adVarChar, adParamInput, 128, pstrSource))<BR><BR> set adoRS = adoCmd.Execute<BR><BR> ReDim aryNavPath(1,20)<BR> aryNavPath(0,0) = "Home"<BR> aryNavPath(1,0) = "/"<BR> intCount = 1<BR> do while not adoRS.EOF<BR> aryNavPath(0, intCount) = adoRS("Name")<BR> aryNavPath(1, intCount) = adoRS("Url")<BR><BR> intCount = intCount + 1<BR> adoRS.MoveNext<BR> loop<BR> call cleanUpStoredProc<BR> ReDim Preserve aryNavPath(1, intCount-1)<BR>end sub<BR>Good luck!

Posting Permissions

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