[Zope] Re: ZMI manage main and zpt to provide reasonable view of content type

Tres Seaver tseaver at palladion.com
Wed Aug 3 14:46:33 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Pratt wrote:
> Hi.  I have been working on a product in that works with filesystem
> content for CMF.  I have my content types developed and they are all
> registered and working fine but my hitch has to do with edit and views
> screens.  I want to emulate the way that the ZMI handles things because
> the manage_main screen is smart enough to display an edit area if
> content type is text/html etc. while it will display binary files
> without an edit area etc.
> 
> Where is manage_main for ZMI located to look at what it is doing so that
> I can potentially emulate its behavior in my edit and view ZPT?  I am
> not certain how many behaviors it has based on the type it gets - maybe
> there are really only a few.

 $ZOPE/lib/python/OFS/dtml/fileEdit.dtml

> Alternatively, if there are suggestions on what I could do in my ZPT to
> display the right view based on the object's content type, this would be
> quite welcome.  I don't want to resort to constructing a list of all
> content types (mime types)  and testing against these so am hoping I can
> hook into zope's functionality that is already doing this for ZMI.  Many
> thanks.


Tres.
- --
===================================================================
Tres Seaver          +1 202-558-7113          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC8REJ+gerLs4ltQ4RAiBsAJ90AZ48N8dXegbuz+R/6lvUxuNIRQCdEbgR
TGjLiz6dwjVs/larYlXRitY=
=OefI
-----END PGP SIGNATURE-----



More information about the Zope mailing list