[Zope] DTML Question

Stoons -=: Headnet :=- stoons@headnet.dk
Wed, 15 Jan 2003 00:13:15 +0100


Actually it is rather simpe (I think)

<dtml-let lang="REQUEST.get('HTTP_ACCEPT_LANGUAGE')">
  <dtml-in objectValues>
   <dtml-let folder=id>
    <dtml-if expr="folder[2:]==lang[2:]">
     <dtml-var lang>
    </dtml-if>
   </dtml-let>
  </dtml-in>
</dtml-let>

that's it ...

/Stoons

----- Original Message -----
From: "beno" <zope@thewebsons.com>
To: <zope@zope.org>
Sent: Tuesday, January 14, 2003 11:59 PM
Subject: RE: [Zope] DTML Question


> At 10:51 AM 1/14/2003 -0500, you wrote:
> >[ beno]
> > > I know one cannot nest DTML objects, but the below lets you
> > > know what I'm
> > > trying to accomplish. What is the correct syntax?
> > >
> > > <dtml-let folder="<dtml-var id>">
> > >
> >
> ><dtml-let folder=id>
>
> That simple. Thanks. But I'm still not home free. Here's my code:
>
> <dtml-let lang="REQUEST.get('HTTP_ACCEPT_LANGUAGE')">
>   <dtml-in objectValues>
>    <dtml-let folder=id>
>     <dtml-if expr="folder[2:]==lang[2:]">
>      <dtml-call "REQUEST.set('approved', '[lang]')">
>      <dtml-var approved>
>     </dtml-if>
>    </dtml-let>
>   </dtml-in>
> </dtml-let>
>
> It prints this: *[lang]*. I need it to print the value of the variable.
How
> do I do that?
> TIA,
> beno
>
>
>
> _______________________________________________
> 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 )
>