[Zope] Lost with navigation using objectValues

2000-12-13 Thread Stephane Bortzmeyer

I just try to automatically get a list of subfolders, following the
example in the ZopeBook
http://www.zope.org/Members/michel/ZB/SimpleExamples.html. Here is
my code, in a DTML method in the root folder:

ul
  dtml-in expr="objectValues('Folder')"
lia href="dtml-var absolute_url"
dtml-var title_or_id/a/li
  /dtml-in
/ul

If I call it from /index_html, it works fine. If I call it from any
other document anywhere, I just get ul/ul (so I'm sure the method
has been called) but nothing else as if objectValues sent nothing (no
need to say that I *have* subfolders an I also tried without the
'Folder' restriction, with the same result).

Any advice? Zope RPM 2.2.2 on RedHat 6.2.

 Zope version: Zope 2.2.2 (source release, python 1.5.2, linux2) 
 Python version: 1.5.2 (#1, Feb 1 2000, 16:32:16) [GCC
 egcs-2.91.66 19990314/Linux (egcs- 
 System Platform: linux-i386 
 Process ID: 17906 (4101) 
 Running for: 2 hours 55 min 45 sec 




___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Lost with navigation using objectValues

2000-12-13 Thread Stephane Bortzmeyer

On Wed, Dec 13, 2000 at 11:31:34AM -0600, Tim Cook wrote:

 Are you sure you put it in a DTML Method and not a DTML Document?

Well, viewing the object through the management interface says so. To
be sure, I created a new object from scratch and changed the
standard_html_header to use it. Same problem.

Could it be an error in the calling code? I just say:

dtml-var navbar

[That's a problem I often have with Zope. Things which seems very
basic suddenly become blocking problems.]



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Lost with navigation using objectValues

2000-12-13 Thread Stephane Bortzmeyer

On Wed, Dec 13, 2000 at 11:31:34AM -0600, Tim Cook wrote:

 Are you sure you put it in a DTML Method and not a DTML Document?

OK, I get you: my code is in a DTML method but it was ultimately
called by DTML documents, which produced the wrong result. If I create
a DTML method, it works. After reading the excellent "DTML documents
vs DTML methods" HOWTO, it makes sense but it is quite surprising.

Does it mean I have to turn all my DTML documents into DTML methods if
I want them to call DTML methods, even if they are only content?


___
Zope maillist  -  [EMAIL PROTECTED]
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 )