[Zope] Maybe a stupid newbie question - forcing an in loop to the Root Folder's context.

Trevor Toenjes zope@toenjes.com
Sat, 17 Nov 2001 07:45:47 -0500


ahhh, the magic of acquisition.
You need to restrict the lookup to the root.
There are a couple ways to do it.
Use a <dtml-with rootFolder> to alter the namespace to look-up where you
want it to.
Check out the online how-to for dtml-with.
other options include restrcting traversal using PARENTS.
-Trevor



> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Jim
> Nicholson
> Sent: Saturday, November 17, 2001 12:47 AM
> To: zope@zope.org
> Subject: [Zope] Maybe a stupid newbie question - forcing an in loop to
> the Root Folder's context.
>
>
> I've created a method in the root folder that basically does some dtml-in
> looping over objectValues. It works fine when included (via var) in other
> methods and docs in the root window.
>
> The problem is that I want it to be aquired by sub-folders, but
> want it to
> still loop through the root folder's contents.
>
> In other words, I should be able to call my method anywhere in
> sub-folders or
> items deep in the site, and still get a list of objects in the
> root folder.
>
> Can I do this in DTML? Does it require python? Does it need to be
> an external
> script? Can someone point me in a direction?
>
> - Jim
> dongle@home.com
>
> _______________________________________________
> 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 )