_ 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" <[EMAIL PROTECTED]>
To: "Rik Hoekstra" <[EMAIL PROTECTED]>
Cc: "J. Atwood" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
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/
> [EMAIL PROTECTED] |   <dtml-var pithy_quote>     | http://linux.com/
>
>
> _______________________________________________
> 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 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 )

Reply via email to