[Zope] ZPT list is dead... zpt nav question

David H bluepaul at earthlink.net
Thu Apr 14 01:05:33 EDT 2005


David H wrote:

> Norbert Ray-Goldman wrote:
>
>> so I am posting this here. I would like my zpt to list only folders in
>> a director - essentially filtering out all other meta_type(s)... can
>> you tell me where I am going wrong with the filtering here ?
>>
>>
>> ################################################
>>
>> <html>
>>  <head>
>>    <title tal:content="template/title">The title</title>
>>  </head>
>>  <body>
>> <span>
>> <a href="HOME_URL" tal:attributes="href container/absolute_url"
>>           tal:content="container/title_or_id">TITLE OR ID</a>
>>
>> <span tal:repeat="item here/objectValues">
>> <a href="" tal:attributes="href item/absolute_url"
>> tal:condition="python:item.meta_type=='Folder'">URL</a>
>> </span>
>>
>> </span>
>>
>>  </body>
>> </html>
>>
> Norbert,
>
> I copied your code example and ran it on my system (other's do 
> cross-word puzzles).  It raised an authentication challenge (even 
> though I'm logged in as "Manager"). Does it do that in your case?
>
> The culprit (on my Zope 2.7.4) is the reference to item/meta_type (or 
> python: item.meta_type) ...   I thought meta_type is an unprotected 
> attribute?
>
> David
>
>
>
>
OK this is getting odder ... the problem I just described occurs only in 
the transient temp_folder.  Could someone else try this in temp_folder 
vs "normal" folders?,
eg

<span tal:repeat="item here/objectValues">
<a href="" tal:attributes="href item/absolute_url"
tal:condition="python:item.meta_type=='Folder'">URL</a>
</span>

Thanks,
David



More information about the Zope mailing list