[ZPT] reversing a repeat
Richard Jones
richard@bizarsoftware.com.au
Sat, 23 Jun 2001 11:21:02 +1000
On Sat, 23 Jun 2001 10:46, Phil Harris wrote:
> Thanks for replying, but I've already tried something along those lines.
>
> I did though try your suggestion, just in case I'd fsck'd something up:
>
> <span tal:define="cat python:here.Catalog()" tal:repeat="item
> python:cat.reverse() or cat">
> <div class="articleTitle">
> <a class="articleLink" href="" tal:attributes="href item/linkUrl"
> tal:content="item/Title">link text</a>
> <div class="email">
> <span tal:replace="here/bobobase_modification_time">timedate
> here</span>
> (<a href="mailto:" tal:attributes="href python:'mailto' +
> item.email" tal:content="item/author">author</a>)
> </div>
> </div>
> <div class="article" tal:content="item/content"> </div>
> <br />
> </span>
> </div>
>
>
> I get an attribute error on reverse, it seems that the results from the
> Catalog don't have either reverse or sort methods.
Sorry about that - I'd forgotten about the brains (our search methods return
the processed results as lists).
Short of writing python method that does the conversion, I'm not sure what
your options are...
Richard
--
Richard Jones
richard@bizarsoftware.com.au
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)