Re: [Zope] Calling a DTML method in a subfolder that uses PARENTS[0]

2001-01-05 Thread Dieter Maurer

Soren Roug writes:
 > Hello,
 > 
 > I'm trying to call a method inside a folder that uses this common way of
 > listing its content:
 > 
 > 
 > 
 > 
 > 
 > Let's call this folder FileLibrary. (It's actually a Z Class subclassed
 > from ObjectManager)
 > 
 > My problem is when I call the method from the folder above, then PARENTS
 > is unchanged and the script will try to enumerate the files in the
 > folder I'm calling from. I've tried several things, e.g.
 > 
 > ...
 > 
 > ...

   

would do it, but would be *VERY* hacky code.

Instead:
   Give your method a parameter, say "sourcefolder".
   In your method:

  
   
   (You may want to factor the "(_.has_keyPARENT[0])" out.)

   Then, when your method should use a special folder, use:

 
   
 


Dieter

___
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 )




[Zope] Calling a DTML method in a subfolder that uses PARENTS[0]

2001-01-05 Thread Soren Roug

Hello,

I'm trying to call a method inside a folder that uses this common way of
listing its content:





Let's call this folder FileLibrary. (It's actually a Z Class subclassed
from ObjectManager)

My problem is when I call the method from the folder above, then PARENTS
is unchanged and the script will try to enumerate the files in the
folder I'm calling from. I've tried several things, e.g.

...
...


...

Nothing works.

How do I get it to work?

___
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 )