Forum Moderators: phranque

Message Too Old, No Replies

Are Dynamic Breadcrumbs Possible?

         

iwidesign

10:37 am on Mar 19, 2003 (gmt 0)

10+ Year Member



Hi,

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!

Alternative Future

10:46 am on Mar 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi and Welcome to WebmasterWorld iwidesign,

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

iwidesign

11:01 am on Mar 19, 2003 (gmt 0)

10+ Year Member



Hi Alternative Future,

Thanks very much for responding ...

Could you tell me where I would find such info ... just done a quick search and not sure what I'm looking for ...

Cheers,

Ian

Alternative Future

11:40 am on Mar 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

[added]Sorry was busy with another work person at that time wrong URL it should have been :
jakarta.apache.org/struts/index.html
And another good resource for research is:
husted.com/struts/
[/added]

Any other help you may need just ask :)

KR,

-gs

Alternative Future

12:33 pm on Mar 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi again,

Above post amended to correct URL!

-gs

aspdaddy

1:24 pm on Mar 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think this is possible in most language by implementing a simple lifo stack.

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

lorax

1:28 pm on Mar 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hello iwidesign and welcome to WebmasterWorld.

The dynamic breadcrumbs are possible with a variety of scripting languages. A search on your favorite SE for "dynamic breadcrumb navigation" should yield some good starting points.

Sae_Monsta

4:39 pm on Apr 3, 2003 (gmt 0)



PHP is also a good solution for dynamic breadcrumbs. Echo $PHP_SELF (to give you the current URL). Save this variable in an array (for each page the user visits) and pass the array along from page to page.

href="mypage.php?PAGE_ARRAY=<?php echo $PAGE_ARRAY;?>"

Just a thought; maybe not too elegant but quick and easy.

Sae