On Mon, Jan 07, 2008 at 01:14:27PM +0000, Dave Howorth wrote:
>
> crumbs.$n AFAIK.
>
Thanks! Sorted with this:
<div id="breadCrumb">
[%
# Bread-crumbs for all pages other than the home page:
IF template.name != 'index.tmpl';
crumbs = template.name.split('/');
IF crumbs.last == 'index.tmpl';
discarded = crumbs.pop;
END;
discarded = crumbs.pop;
-%]
| <a href="/" title="Home">Home</a>
[%-
FOREACH crumb IN crumbs;
href = '/';
n = 0;
WHILE n < loop.count;
href = "${href}${crumbs.$n}/";
label = crumbs.$n;
n = n + 1;
END;
%]
> <a href="[% href %]" title="Up a level">[% label %]</a>
[%-
END;
END;
%]
</div>
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates