[Zope] Is Zope syntax inconsistent ?

Phil Harris phil.harris@zope.co.uk
Fri, 10 Mar 2000 15:28:35 -0000


Richard,

As someone earlier today on the list said, "if it's in quotes it's python"
(or something similar).

Basically Python rules apply when using any expressions in zope dtml-var and
other tags.

Well, that's how I think of it.

Phil
phil.harris@zope.co.uk

----- Original Message -----
From: "Richard Moon" <richard@dcs.co.uk>
To: <Zope@zope.org>
Sent: Friday, March 10, 2000 2:28 PM
Subject: Re: [Zope] Is Zope syntax inconsistent ?


> Thanks for solving the immediate problem Phil - another UK Zopista -
> there's a few of you out there ! I think I've had help from all of you in
> turn :-)
>
> However I think this reveals a basic problem with the syntax which is
> causing me grief and presumably there are others like me out there.
>
> I would expect an object to behave consistently wherever it was used - so
> if it renders/returns/evaluates to 'zope' inside a dtml-var I would expect
> it equally to render/return/evaluate to 'zope' inside a dtml-if.
>
> If it doesn't then surely we have an inconsistent syntax. How do we know
> how any object is going to behave inside a dtml tag ?
>
> Any comments ?
>
>
> At 13:08 10/03/00 +0000, you wrote:
> >Richard,
> >
> >The equality check on AUTHENTICATED_USER will always fail because your
> >comparing an object with a string.
> >
> >You need soemthiong more like :
> >
> ><dtml-if expr="AUTHENTICATED_USER.getUserName()=='zope'">
> >
> >hth
> >
> >Phil
> >phil.harris@zope.co.uk
> >
> >
> >----- Original Message -----
> >From: "Richard Moon" <richard@dcs.co.uk>
> >To: <zope@zope.org>
> >Sent: Friday, March 10, 2000 9:13 AM
> >Subject: [Zope] Is Zope syntax inconsistent ?
> >
> >
> > > I've hit the 'Zope Wall' again ! Can anyone explain why
> > >
> > > <dtml-if expr="AUTHENTICATED_USER=='zope'">
> > > ZOPE !
> > > <dtml-else>
> > > NOT ZOPE !
> > > </dtml-if>
> > > <dtml-var AUTHENTICATED_USER>
> > > <br>
> > >
> > > Displays
> > >
> > > NOT ZOPE ! zope
> > >
> > > While this
> > > <dtml-if expr="tune_id=='Reel'">
> > > REEL !
> > > <dtml-else>
> > > NOT REEL !
> > > </dtml-if>
> > > <dtml-var tune_id>
> > >
> > > Displays
> > >
> > > REEL ! reel
> > >
> > > Which is what I expected !
> > >
> > >
> > > Richard Moon
> > > richard@dcs.co.uk
> > >
> > >
> > > _______________________________________________
> > > 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 )
> >
>
>
> Richard Moon
> richard@dcs.co.uk
>
>
> _______________________________________________
> 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 )
>