[Zope-CMF] Creating new portal type based on Document

Tres Seaver tseaver@digicool.com
Fri, 13 Jul 2001 07:43:23 -0400


> Hello,
> 
> I was trying to create a new portal type based on Document. Actually it
> should be like document for now - only that it is an article :-))
> Later on I will create some new views etc.
> 
> I added a new factory based type information, gave it an id of
> 'Article' and set it to use the default type information from
> CMFDefault: Document.
> I changed the meta type on the properties tab to Article.
> 
> Now I know that the Document is an FS-based product and that the meta
> type is hard-coded into the class but I thought that there was somehow
> to avoid this.
> I have added some "articles" to my portal. When I go to the search
> screen and search for content with type=Article it finds my articles -
> and only them (as I want I to *S*).
> Then I have created a page to list the articles (for now just list them
> - later on I will make it more sophisticated). I have copy/pasted the
> code from the recent_news method and changed the search for News Item
> into Article (the meta_type argument). But it finds nothing (guess it's
> because the article type is based on the document type).
> 
> I saw at the search page that it could list the type as 'Article'. In
> the code it uses the property missing-Type.
> 
> Is there a way that I can search the catalog for missing-Type='Article'
> instead of meta_type='Article' (which won't work)

Sorry about the delay;  I'm only now catching up on mail after vacation.
You want to do a search for 'Type'=='Article', not 'metatype'.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org