Re: [Zope] ZPT list is dead... zpt nav question
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 ? The title TITLE OR ID Make it: ...and remove the test on meta_types. Or you can also put the filter in a python script, so the template does not need to know about that... -- Bruno Desthuilliers Développeur [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZPT list is dead... zpt nav question
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 ? The title TITLE OR ID URL You don't have to do the filtering yourself. Just pass objectValues (or any of its related methods) a meta_type and it will return only those. You can even pass a list if you want to filter on several. See the API docs: http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixB.stx --jcc ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZPT list is dead... zpt nav question
Your code works OK for me - I see a list of links: URL URL URL URL URL and each one links to a folder only. You did not say what was wrong with your output. Were you forgetting to set tal:content to the title of the listed folder to appear in place of URL: URL Cliff 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 ? The title TITLE OR ID URL ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZPT list is dead... zpt nav question
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 ? The title TITLE OR ID URL 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 URL Thanks, David ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZPT list is dead... zpt nav question
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 ? The title TITLE OR ID URL ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) 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 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )