[Zope] Could Someone Clean This DTML Up?

beno zope@thewebsons.com
Mon, 06 Jan 2003 11:16:14 -0400


At 02:28 PM 1/6/2003 +0000, you wrote:
><dtml-let lang="REQUEST.get('HTTP_ACCEPT_LANGUAGE')">
>   <dtml-in expr="context.objectsInTheFolder">
>    <dtml-if expr="&dtml-id==&dtml-lang">
>     <dtml-call "REQUEST.set('approved', ['lang'])">
>    <dtml-else>
>     <dtml-call "REQUEST.set('approved', 'en-us')">
>    </dtml-if>
>   </dtml-in>
></dtml-let>

There were a couple of seeming syntax errors in here that made the compiler 
hiccup, specifically double-quoting in line #3, but the real reason I'm 
writing back is I know darn well that *objectsInTheFolder* isn't how you 
call objects in the current container. How do I do that?
TIA,
beno

<dtml-let lang="REQUEST.get('HTTP_ACCEPT_LANGUAGE')">
   <dtml-in expr="context.objectsInTheFolder">
    <dtml-if expr="'&dtml-id;'=='&dtml-lang;'">
     <dtml-call "REQUEST.set('approved', ['lang'])">
    <dtml-else>
     <dtml-call "REQUEST.set('approved', 'en-us')">
    </dtml-if>
   </dtml-in>
</dtml-let>