Re: [Zope] Accessing a Subfolder of a Parent Folder

2005-12-05 Thread Peter Bengtsson
dtml-call REQUEST.set('parentFolder', PARENTS[2].id + 'Test')
dtml-call _.getitem(REQUEST.get('parentFolder')).initialize_vars()

On 12/5/05, Asad Habib [EMAIL PROTECTED] wrote:
 How do I access the subfolder of a parent folder? I am using the following
 but cannot seem to access the folder object:

 dtml-call REQUEST.set('parentFolder', PARENTS[2].id + 'Test')
 dtml-call REQUEST.get('parentFolder').initialize_vars()

 I get the following error:

 Error Type: AttributeError
 Error Value: 'str' object has no attribute 'initialize_vars'

 I understand that a DTML method cannot be called on a string, but how do I
 obtain the object that represents the subfolder 'Test'? Any help would be
 appreciated. Thanks.

 - Asad


 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )



--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Accessing a Subfolder of a Parent Folder

2005-12-05 Thread Jonathan

try googling 'aq_parent'.

Jonathan

- Original Message - 
From: Asad Habib [EMAIL PROTECTED]

To: zope@zope.org
Sent: Monday, December 05, 2005 5:50 PM
Subject: [Zope] Accessing a Subfolder of a Parent Folder


How do I access the subfolder of a parent folder? I am using the following 
but cannot seem to access the folder object:


dtml-call REQUEST.set('parentFolder', PARENTS[2].id + 'Test')
dtml-call REQUEST.get('parentFolder').initialize_vars()

I get the following error:

Error Type: AttributeError
Error Value: 'str' object has no attribute 'initialize_vars'

I understand that a DTML method cannot be called on a string, but how do I 
obtain the object that represents the subfolder 'Test'? Any help would be 
appreciated. Thanks.


- Asad


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )