[Zope-CMF] Atribute error

Tres Seaver tseaver@palladion.com
Tue, 19 Jun 2001 10:01:06 -0400


Nagarjuna G. wrote:

> May be a simple problem within CMF but I am stuck.  I have imported a
> directory with lots of content from another instance of zope.  I have
> imported it within a CMF folder.  When I try to view the content I get
> this error.
>                      Error Type: AttributeError
>                      Error Value: Type
> 
> Does it mean that one cannot import non-CMF data into
> portal folders?
> How do I import then?


You have imported the objects;  they just don't "smell like content"
to the CMF, because they don't carry the additional "contentish"
information with them.

If you want to view the imported objects as though they were CMF
content, you need to let the CMF know how to deal with them by
creating "type information" objects for them in the 'portal_types'
tool.  For instance, to make DTMLDocuments visible as content:

  - Create a FactoryTypeInformation object in the 'portal_types'
    tool;  call it 'DTML Document';

  - Leave its "product" and "factory" fields blank, in order to
    suppress adding them by users who can't use the ZMI (DTML Documents
    are *dangerous* in ways that non-executable content can never
    be);

  - Set its metatype to 'DTML Document', and map an action, "view"
    onto a skin method, 'dtml_document_view';

  - Create the skin method.

Hope this helps,

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