Upayavira
A genius in your own lunchtime (well, my lunchtime,
actually!)
Thanks!
Derek
>>> [EMAIL PROTECTED] 2004/11/12 12:27:45 PM >>>
Derek Hohls wrote:
>Does anyone know of a relative simple mechanism
>for creating a breadcrumb trail for a website i.e. a
>way to track which pages a user has selected and
>display them (say, the last 10) - typically in a row
>at the top of the page :
>
>page1 > page2 > page3
>
>Any hints or pointers also welcome!
>
>
I've done it before but showing the place in a hierarchy - you can do
this with the ancestor:: axis in XSLT.
As to your requirement, how about a little flowscript and JXTemplate:
function yourpage() {
var yourURL = cocoon.parameters["URL"];
var breadcrumbs = session.getAttribute("breadcrumbs");
if (breadcrumbs == null) {
breadcrumbs = new java.util.ArrayList();
session.setAttribute("breadcrumbs", breadcrumbs);
}
breadcrumbs.add(yourURL);
cocoon.sendPage("yourURL", {"breadcrumbs" : breadcrumbs});
}
Something like that. Not sure about the exact syntax, but it is more or
less there I guess. All you're doing is storing an ArrayList in your
session, and each time a page is viewed, add the URL to your array
list.
Then this array list is passed into the JXTemplate, where it can be
iterated over with <jx:for-each>.
Make sense?
Upayavira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]