[Zope-CMF] Adding properties to existing CMF-Types

Jochen Haeberle listen@midras.de
Tue, 10 Sep 2002 16:24:26 +0200


--============_-1180454627==_ma============
Content-Type: text/plain; charset="us-ascii" ; format="flowed"

Hi Tres,

this sounds good to me :-)

After posting to the list I found two HowTos on CMF.zope.org, 
http://cmf.zope.org/Members/tseaver/how_tos/faq_howto is from you :-)

I tried exactly as described to add a faq-object, deriving from 
PortalContent and DefaultDublin... my problem is, that my FAQ_object 
does not show up when I try to add a new FactoryTypeInformation 
object.

I am using Zope2.5.1, CMF1.3 and Plone alpha4 on SuSE Linux

Deriving from CMFDefault:Document would be ideal! If the above works, 
do I need the checkmark at  Include standard Zope persistent object 
base classes? when adding the ZClass? I guess CMFDefault:Document 
contains that already??

Thanks
Jochen

At 9:26 Uhr -0400 10.09.2002, Tres Seaver wrote:
>On Tue, 2002-09-10 at 09:25, Kevin Carlson wrote:
>>  If your new type closely resembles an existing CMF type, you have the option
>>  of creating a new copy of the type in portal_types and adding new properties
>>  to instances of the new type.  Make sense?
>
>There is no non-programmatic way to do this, as the "type" of the object
>does not (yet, anyway) have convey any way to signal extra properties.
>One way to accomplish what you ask is to use a ScriptableTypeInformation
>object, and have the PythonScript which creates an instance also add
>properties.  Another way to do this would be to use a ZClass, derived
>for instance from CMFDefault.Document.
--============_-1180454627==_ma============
Content-Type: text/html; charset="us-ascii"

<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>RE: [Zope-CMF] Adding properties to existing
CMF-Types</title></head><body>
<div>Hi Tres,</div>
<div><br></div>
<div>this sounds good to me :-)</div>
<div><br></div>
<div>After posting to the list I found two HowTos on CMF.zope.org,
http://cmf.zope.org/Members/tseaver/how_tos/faq_howto is from you
:-)</div>
<div><br></div>
<div>I tried exactly as described to add a faq-object, deriving from
PortalContent and DefaultDublin... my problem is, that my FAQ_object
does not show up when I try to add a new FactoryTypeInformation
object.</div>
<div><br></div>
<div>I am using Zope2.5.1, CMF1.3 and Plone alpha4 on SuSE Linux</div>
<div><br></div>
<div>Deriving from CMFDefault:Document would be ideal! If the above
works, do I need the checkmark at&nbsp;<font face="Verdana" size="+2"
color="#333333"><b> Include standard Zope persistent object base
classes?</b></font> when adding the ZClass? I guess
CMFDefault:Document contains that already??</div>
<div><br></div>
<div>Thanks</div>
<div>Jochen</div>
<div><br></div>
<div>At 9:26 Uhr -0400 10.09.2002, Tres Seaver wrote:</div>
<blockquote type="cite" cite>On Tue, 2002-09-10 at 09:25, Kevin
Carlson wrote:<br>
&gt; If your new type closely resembles an existing CMF type, you have
the option<br>
&gt; of creating a new copy of the type in portal_types and adding new
properties<br>
&gt; to instances of the new type.&nbsp; Make sense?<br>
<br>
There is no non-programmatic way to do this, as the &quot;type&quot;
of the object<br>
does not (yet, anyway) have convey any way to signal extra
properties.<br>
One way to accomplish what you ask is to use a
ScriptableTypeInformation<br>
object, and have the PythonScript which creates an instance also
add<br>
properties.&nbsp; Another way to do this would be to use a ZClass,
derived</blockquote>
<blockquote type="cite" cite>for instance from
CMFDefault.Document.</blockquote>
</body>
</html>
--============_-1180454627==_ma============--