[Zope-CMF] Setting the default portal content view

Tres Seaver tseaver@zope.com
26 Apr 2002 11:37:01 -0400

On Fri, 2002-04-26 at 11:25, Lesley Lam wrote:
> Hi,
> I am in the process of creating a new portal content type.  It is very
> similar to the Document type, but has a few more text areas that the user
> can edit.  It is mostly working right now, but I am stuck on a few things:
> 1.  How do I change the default view for my new content type?  The
> Document type uses document_view, but I can't find out where that is set.

The default view is the first one in the actions tab for which the user
has permissions.  'document_view' is in that spot for the 'Document'
type information object, so content whose 'portal_type' is 'Document'
defaults to it.

> 2.  Where do you set the 'view' and 'Edit' links that are displayed when
> using actions_box?  I changed the actions value in the
> factory_type_information section, but that doesn't change the links.

Hmm, it sounds as though your objects aren't finding the right type
information object;  how are you creating them?  To find out what the
content object thinks its type is, change the URL to call the Type
method, e.g.::


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