works in method but not document?
Hi All, Here's the problem... We have a sidebar component called "submenu" that calls objectIds() to get the list of object ids in the containing folder. It's included in content pages. If submenu is called on its own, objectIds works fine. If it's called from within a DTML Method, objectIds works fine. If it's called from within a DTML Document, objectIds returns None. Any ideas? Cheers, Dan
Dan Jacobs wrote:
Hi All,
Here's the problem...
We have a sidebar component called "submenu" that calls objectIds() to get the list of object ids in the containing folder. It's included in content pages.
If submenu is called on its own, objectIds works fine. If it's called from within a DTML Method, objectIds works fine. If it's called from within a DTML Document, objectIds returns None.
Any ideas?
Cheers,
Dan
_______________________________________________ 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 )
a dtml document creates its own namespace but it cant contain any other objects - only properties so objectIds returns none a dtml method is a method of the containg object eg a folder so objectIds is called on the folder and therefore returns the subobjects of the folder
in which case, how do we do an objectIds() from within a DTML Document? REQUEST.PARENTS[0].objectIds() doesn't seem to work either. dj ----- Original Message ----- From: "zope-mailinglist" <zope-mailinglist@mopa.at> To: "Dan Jacobs" <dan@danjacobs.com> Cc: <zope@zope.org> Sent: Thursday, July 19, 2001 12:06 PM Subject: Re: [Zope] works in method but not document?
Dan Jacobs wrote:
Hi All,
Here's the problem...
We have a sidebar component called "submenu" that calls objectIds() to get the list of object ids in the containing folder. It's included in content pages.
If submenu is called on its own, objectIds works fine. If it's called from within a DTML Method, objectIds works fine. If it's called from within a DTML Document, objectIds returns None.
Any ideas?
Cheers,
Dan
_______________________________________________ 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 )
a dtml document creates its own namespace but it cant contain any other objects - only properties so objectIds returns none
a dtml method is a method of the containg object eg a folder so objectIds is called on the folder and therefore returns the subobjects of the folder
_______________________________________________ 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 )
Dan Jacobs wrote:
in which case, how do we do an objectIds() from within a DTML Document? REQUEST.PARENTS[0].objectIds() doesn't seem to work either.
dj
expr="ParentFolder.objectIds()" hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
Tried that and got this... Error Type: NameError Error Value: ParentFolder Hair is being ripped from my head as we speak! Please help. Thanks, Dan On Thu, 19 Jul 2001, Casey Duncan wrote:
Dan Jacobs wrote:
in which case, how do we do an objectIds() from within a DTML Document? REQUEST.PARENTS[0].objectIds() doesn't seem to work either.
dj
expr="ParentFolder.objectIds()"
hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
On Fri, 20 Jul 2001, Dan Jacobs wrote:
Tried that and got this...
Error Type: NameError Error Value: ParentFolder
Hair is being ripped from my head as we speak! Please help.
<dtml-in "aq_parent.objectValues()"> hope this keeps your hair on... -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
THANK YOU! Luckily I still had some hair left by the time I read your mail. Its all working nicely now and the world is a happier place. dj On Thu, 19 Jul 2001, Joel Burton wrote:
On Fri, 20 Jul 2001, Dan Jacobs wrote:
Tried that and got this...
Error Type: NameError Error Value: ParentFolder
Hair is being ripped from my head as we speak! Please help.
<dtml-in "aq_parent.objectValues()">
hope this keeps your hair on...
-- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
_______________________________________________ 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 (5)
-
Casey Duncan -
Dan Jacobs -
Dan Jacobs -
Joel Burton -
zope-mailinglist