[Zope] Feeling like a newbie.. document id if statement?

Phil Harris phil.harris@zope.co.uk
Wed, 24 May 2000 15:36:43 +0100


_ is the default namespace which you can treat sort of like a dictionary, so
this means you can index into it with the name 'things'.

so _['id'] means give me the id of the current namespace.

well sort of.


----- Original Message -----
From: "Timothy Wilson" <wilson@visi.com>
To: "Rik Hoekstra" <rik.hoekstra@inghist.nl>
Cc: "J. Atwood" <jatwood@bwanazulia.com>; <zope@zope.org>
Sent: Wednesday, May 24, 2000 3:18 PM
Subject: Re: [Zope] Feeling like a newbie.. document id if statement?


> On Wed, 24 May 2000, Rik Hoekstra wrote:
>
> > "J. Atwood" wrote:
> > >
> > > Ok.. this is really dumb, but for some reason I can't get this to
work.
> > >
> > > <dtml-if "id=='index_html'">
> >
> > I believe this should be
> >
> >  <dtml-if "_['id']=='index_html'">
>
> I wonder if someone would be kind enough to translate Rik's code into
Enlish
> for me. I know that expressions inside "" are Python, but what is the
> function of the [] and _?
>
> -Tim
>
> --
> Tim Wilson      | Visit Sibley online:         | Check out:
> Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
> W. St. Paul, MN |                              | http://slashdot.org/
> wilson@visi.com |   <dtml-var pithy_quote>     | http://linux.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 )