On Mon, 2008-03-24 at 16:17 -0400, Dan Stanger wrote:
> Many of the helma pages have a page trail for example:
> helma.org > Home > docs > tools
How to do this depends on your content structure. If your site is made
up of similar Page objects arranged in a hierarchy, and a page is
related to its parent through the pageParent property, a simple method
for retrieving a breadcrumb list might look like this:
function getBreadcrumbs() {
var crumbs = <span>{this.title}</span>;
var page = this;
while(page = page.pageParent) {
crumbs = <span><a href={page.href()}>page.title</a> > </span>
+ crumbs;
}
return crumbs;
}
--
Joshua Paine
_______________________________________________
Helma-user mailing list
Helma-user@...
http://helma.org/mailman/listinfo/helma-user