Derek Hohls wrote:
I've done it before but showing the place in a hierarchy - you can do this with the ancestor:: axis in XSLT.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!
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]
