[Zope-CMF] Making document editing == news item editing

Tres Seaver tseaver@palladion.com
Tue, 28 Aug 2001 08:03:32 -0400 (EDT)


On Tue, 28 Aug 2001, Frank McGeough wrote:

> okay. So I modified my Factory Based Type Information for News Item under
> portal_types. I changed the Actions so that I had document_view and
> document_edit_form and the Factory Method in product to addDocument.
> Awesome! Now news item editing is the same as document editing. The problem
> is that news items are no longer news items. They are documents. That is,
> they don't show up news_box and in every other aspect they act just like
> documents...except that it shows a little News item icon beside them in the
> user folder. How do I change the meta search to show up these "document News
> Items"?

'news_box' is broken;  it is searching for 'meta_type', rather than
'Type'::

  
  <dtml-in "portal_catalog.searchResults( meta_type='News Item'
                                        , sort_on='Date'
                                        , sort_order='reverse'
                                        , review_state='published'
                                        )" size="10">

shoule be (you can customize it to get this)::
  
  <dtml-in "portal_catalog.searchResults( Type='News Item'
                                        , sort_on='effective'
                                        , sort_order='reverse'
                                        , review_state='published'
                                        )" size="10">

Note that I munged the 'sort_on' key, as well, to use a "real"
date field;  you may not like this, however.  I will check in the
fix ('Type' instead of 'meta_type') this morning.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com