[Zope-CMF] adding document at user creation

Cyrille Giquello cyrille@ktaland.com
Fri, 22 Jun 2001 11:52:41 +0200


Hi,

I' always on the same subject, that is to customize the CMF addMember.

In last thread about that , 3 persons answered 3 different method.
I choiced the easiest  ;o) It is to stay in DTML / Python script way.

So, I copy the skin control.register to skin.custom
and add a call to myAddMember(...) just after
portal_registration.addMember(...)

Then, in the root of the CMF Site I defined a Python Script called
myAddMember().
it is like :

>>BEG>>
## Script (Python) "myAddMember"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=portal_registration,username,properties
##title=
##
members =  getattr(context, 'Members', None)
f=getattr( members, username )
f.manage_addDocument( "contact.html","Contact page for "+username )
<<END<<

Question 1 :
I pass 3 parameters from register(), but I don't know what can I do with
portal_registration.

Question 2 :
I've difficulties to find the right documentation for the right case.
For example, I can't find how to add a DTML document. The call I did :
    F.manage_addDocument(id,title)
create a DTML Method.
Do you know wich kind of API method I've to use to get more parameters
for creating document ?

Thanx for reading ;o)
cheers,
Cyrille.