[Zope] Parents again

Chris Withers chrisw@nipltd.com
Tue, 08 Feb 2000 16:34:06 +0000


This is only confusing until you realise that PARENTS[whatever] returns an
object ;-)

<dtml-var "PARENTS[-1].title">
or
<dtml-var "PARENTS[-1].id">

might make more sense...

Chris

Ragnar Beer wrote:
> 
> That's what I thought how it SHOULD work, but <dtml-var
> "PARENTS[-1]"> returns nothing and <dtml-var "PARENTS"> returns "[, ,
> ]" the url beeing http://mydomain.de/test/parents_test/index_html no
> matter whether I access index_html via "view" or url traversal.
> 
> >Try looking at the PARENTS list:
> >
> >I'd say that you want something like <dtml-var "PARENTS[-1]"> which should
> >give you this objects parent.
> >
> >Caveat:  I'm not sure if this works with DTML Methods.
> >
> >Phil
> >phil.harris@zope.co.uk
> >
> >|  -----Original Message-----
> >|  From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> >|  Ragnar Beer
> >|  Sent: Tuesday, February 08, 2000 12:49 PM
> >|  To: zope@zope.org
> >|  Subject: [Zope] Parents
> >|
> >|
> >|  I have two questions where I just couldn't find the answer to (the
> >|  documentation-retrieval is killing me):
> >|
> >|  1. How can a dtml-method know which folder it is in?
> >|
> >|  2. How can an external method know which folder it is in?
> >|
> >|  I think I read this somewhere - I just can't retrieve it...
> >|
> >|  Ragnar
> >|
> >|  _______________________________________________
> >|  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 )
> >|
> >
> >
> >_______________________________________________
> >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 )
> 
> _______________________________________________
> 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 )