Everitt's suggestion is good, but I suspect that you will probably have to write an External Method to automatically create and enter the session... Go to lib/python/Products/OFSP/Session.py and browse the source for the functions and their parameters. In particular, on the Folder object you have created you need to execute .manage_addSession, then For example, if I was in the parent folder which will contain your newly created Folder, my DTML might call: <!--#var newSession(PARENTS[0],folder)--> where 'folder' is obtained from a form, and PARENTS[0] is the form-response's immediate parent (i.e. the containing folder), and newSession is an External Method something like this: def newSession(parent,foldername): parent.manage_addFolder(foldername) current=getattr(parent,foldername) #now current is 'inside' the new folder current.manage_addSession('session_id','ActiveSession') current=getattr(current,'session_id') current.enter() return 'some DTML snippet' Note: This is untested code!
---------- From: Max Murdock[SMTP:ffelici@gol.grosseto.it] Sent: Thursday, February 25, 1999 4:32 AM To: zope@zope.org Subject: [Zope] [Q] About sessions and Zope
Zope is surely a great system to develop dynamic html sites, and even a novice like me can learn how to use it.
My problem is that I've got to be able to make users able to manage sessions in a transparent way: people who get in the site should open a session, create a folder, put there their material and leave to tehe site manager the task to verify what they sent and close the session. And all this should be done seamlessly by the user, possibly with a single form, without having the task to "click to add session", the enter the name, then go to the session and make ti active, create the folder and upload there the files... The main.dtml suggests me to present the user a form with the "manage_addSessionForm" button to press... then he can put the session name and click "add". So he automatically returns to the folder view, and that's not exacltly what "transparent to the user" means, understand me... So I guess I have to reprogram the routine that makes the form: instead of showing the folder it should automatically start the session and ask for a new folder to be created. The PROBLEM: where's that routine? Where's the script that makes the form? Where is it going when I select the "manage_addSessionForm" action? I ain't been able to find it, even with the "find" command, ain't got other ideas...
I understand maybe this Q requires a bit of answer... if anyone wont' take this labour I can perfectly understand; otherwise: can someone point me a doc explaining all this? I've downloaded most of the docs in the Zope site, and I can dnload more...
TIA! Max Murdock
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope