[Zope] ZCatalog of method output

Tom Deprez tom.deprez@uz.kuleuven.ac.be
Mon, 03 Apr 2000 10:27:38 +0200


Use an external method for thus and all things will go fine.

Tom.

At 13:28 31/03/2000 -0800, you wrote:
>I read you could define a ZClass instance's method as a field-index of a
>ZCatalog; but it's not working for me.
>
>The DTML method dept_code is simply:
>
>  <dtml-return "_.string.split(jobcode,'-')[0]">
>
>When I call the method directly it returns a single character, the first
>character of the jobcode.
>
>The method dept_code is defined as a field-index of the ZCatalog JobsCat.
>But when I access JobsCat thus:
>
> <dtml-in "JobsCat(meta_type='Job Opening', sort_on='dept_code')">
>   <li>
>   <a href="<dtml-var "JobsCat.getpath(data_record_id_)">">
>            (<dtml-var dept_code>) <dtml-var jobcode>: <dtml-var title></a>
> </dtml-in>
>
>the items are not sorted, and dept_code is null.
>
>Can anyone see what I'm doing wrong?
>
>-- Thanks
>-- Loren
>
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists - 
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
>