[Zope-CMF] re: Creating new portal types

ken bolton kbolton@sputnik7.com
Tue, 12 Jun 2001 14:23:12 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_0276_01C0F34B.360DBA60
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Gitte,

I can help on the first part. Create your ZClass per the portal poll =
tutorial. Once you've got your class made, follow the instructions for =
adding it to portal_types. In there, you've got a multiple selection =
list called Allowed Content Types. Choose your ZClass type in that list. =
Then, go to the Folder in portal_types and deselect the type you don't =
want people to add under Allowed Content Types. There may be a more =
elegant way to do this that I'm unaware of, but it has worked for me =
thus far.

one love,
ken


> I was looking for some docs on how to create new portal types.
> I have tried the example with the poll product but ... what I need to =
create=20
> is a little more complex. I need to create some sort of a folder type =
and=20
> some sort of documents that only can be added in the specific type of =
folder=20
> I create and no where else !!!
>=20
> So I was wondering - can ZClasses work with this ?
> Or must I create python scripts that will be placed in the filesystem =
?
>
> Besides ... I would like to "attach" a database connection to my =
portal so I=20
> can add meta data into this from these new portal types I create. =
Anyone who=20
> has succeeded in doing this ?
>=20
> Regards,


------=_NextPart_000_0276_01C0F34B.360DBA60
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3><FONT=20
face=3DArial size=3D2>Gitte,</FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3><FONT=20
face=3DArial size=3D2></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3><FONT=20
face=3DArial size=3D2>I can help on the first part. Create your ZClass =
per the=20
portal poll tutorial. Once you've got your class made, follow the =
instructions=20
for adding it to portal_types. In there, you've got a multiple selection =
list=20
called Allowed Content Types. Choose your ZClass type in that list. =
Then, go to=20
the Folder in portal_types and deselect the type you don't want people =
to add=20
under Allowed Content Types. There may be a more elegant way to do this =
that I'm=20
unaware of, but it has worked for me thus =
far.</FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3><FONT=20
face=3DArial size=3D2></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3><FONT=20
face=3DArial size=3D2>one love,</FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3><FONT=20
face=3DArial size=3D2>ken</FONT></DIV>
<DIV><BR><BR>&gt; I was looking for some docs on how to create new =
portal=20
types.<BR>&gt; I have tried the example with the poll product but ... =
what I=20
need to create <BR>&gt; is a little more complex. I need to create some =
sort of=20
a folder type and <BR>&gt; some sort of documents that only can be added =
in the=20
specific type of folder <BR>&gt; I create and no where else !!!<BR><FONT =

face=3DArial size=3D2>&gt; </FONT><BR>&gt; So I was wondering - can =
ZClasses work=20
with this ?<BR>&gt; Or must I create python scripts that will be placed =
in the=20
filesystem ?<BR><FONT face=3DArial size=3D2>&gt;</FONT><BR>&gt; Besides =
... I would=20
like to "attach" a database connection to my portal so I&nbsp;<BR>&gt; =
can add=20
meta data into this from these new portal types I create. Anyone who =
<BR>&gt;=20
has succeeded in doing this ?<BR><FONT face=3DArial size=3D2>&gt; =
</FONT><BR>&gt;=20
Regards,</FONT><BR></DIV></FONT></BODY></HTML>

------=_NextPart_000_0276_01C0F34B.360DBA60--