RE: [Zope] Traversal issue...
For traversal, You should just be able to acquire folder B's namespace from folder A using <dtml-with>... If not, I think the following more explicit DTML/Python script combo will work for you: DTML: <dtml-with getUserObject> <dtml-comment>do stuff here</dtml-comment> </dtml-with> -------- #==> TTW Python script ("getUserObject"): username = context.REQUEST.cookienameforuser #following assumes you have an object in folder B with an # id that matches the user name namespace_FolderB = context.REQUEST.PARENTS[1]['FolderBId'][username] return namespace_FolderB Hope this helps... Sean -----Original Message----- From: Rob Foster [mailto:rob@thefosters.com] Sent: Monday, November 05, 2001 11:29 PM To: zope@zope.org Subject: [Zope] Traversal issue... Ok, here's the setup... I've got two adjacent folders: Folder A - This folder has a form that will allow users to edit the properties of a specific zclass instance that resides in Folder B. Folder B - This folder has a bunch of instances (each instance's id maps to the username of a user in the system) Now, the users each have a cookie with their username set... When they fill out the form in folder A, I want to update the instance in B that maps to them (based on the value of their cookie), but I can't seem to "get to" (traverse?) the right instance with either DTML or Python. Any help would be appreciated as always. Thanks, Rob _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
sean.upton@uniontrib.com