[Zope] Simple Breadcrumbs in ZPT

Chris Withers lists at simplistix.co.uk
Mon Mar 22 11:08:33 EST 2004


Jaroslav Lukesh wrote:

> Troy Farrell wrote:
> 
>> I put these in my site root and use them for almost every site I 
>> host.  The page template I call 'you_are_here' and the python script 
>> 'breadcrumbs'.  I probably stole these from something.  Mebbe from 
>> early CMF (?)
> 
> 
> Ohh... What simple in DTML!

Huh? What does DTML buy you here? You're jus tusing parents, which is crummy...
Why the skip unauthorized? Why the -4 slice?

Still, if you really wanted to use parents:

<tal:i define="parents request/PARENTS"
        repeat="i range(len(parents)-4,0,-1)">

<a tal:define="item parents/?i"
    tal:attributes="href item/absolute_url"
    tal:content="item/title_or_id"/>

<tal:c condition="not:repeat/i/end">
&nbsp;&gt;&nbsp;
</tal:c>

</tal:i>

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk




More information about the Zope mailing list