[Zope-CMF] Re: Using CMF metadata in ZPT pages - why are these two different?

grendelAI grendelAI at msn.com
Wed Sep 17 21:58:40 EDT 2003


I recently went through some very similar frustrations. I believe your
problem is with how you are retrieving the dataset of newsItems. If you can
display this section
possibly I can pinpoint it more. But, based on your explanation the removal
of the tal:condition causes the news/Subject to be executed. However, news =
nothing. So
you are trying to retrieve the subject attribute from nothing which will
throw an error. Again I would inspect the statement retrieving the list of
news items as well as insuring
you have news items to retrieve.

Note by retrieval statement is below:

                 results
       python:container.portal_catalog.searchResults(meta_type='News
       Item',sort_on='created',sort_order='reverse',review_state='published',path='/Plone/'+path);

I had to use the searchResults method and additionally prefix the path
statement with my site root in order for it to retrieve news items from the
folder.

Hope this helps




More information about the Zope-CMF mailing list