Forum Moderators: phranque
Anyone help me out?
I need to create a breadcrumbs system that provides the user with an actual route of their journey through our web site, not just display all the folders above the current file being viewed. All breadcrumb features I can find offer the latter solution and this is not what I'm after.
read on ...
For example, if a user enters the site in a sub-directory file, I don't want it to display the path above that file all the way back to the root; I want it to display what file they are viewing and then when they move to a different page, to display the file they are currently viewing and the one they came from, upto a maximum of say 4/5 links.
Is this possible with any language?
I would appreciate any help and the sooner the better!
What you are trying to do is achievable (am sure) with JSP bolted onto the struts framework using the package struts-layout, it has a method for generating breadcrumbs. I only flew past this during my research on the package as it was never intended to be used in our current project! So perhaps you check out all the documentation first :)
HTH,
-gs
The basic idea is a container of links that has a push function that shuffles the elements down when a new one is added.
I did this a while ago with a vbScript stack class stored in the session - but because asp has such bad support for classes stored in thes ession, I gave up and did something like this instead; very messy but does the job.
' call on every page
push ( Request.ServerVariables("URL") )' stack of size 3
sub push ( strPageName )
session("page(1)") = session("page(2)")
session("page(2)") = session("page(3)")
session("page(3)") = strPageName
end sub
' show the breadcrumbs
function show()
show = session("page(1)") & "," & session("page(2)") & "," &session("page(3)")
end function
href="mypage.php?PAGE_ARRAY=<?php echo $PAGE_ARRAY;?>"
Just a thought; maybe not too elegant but quick and easy.
Sae