[Zope] newbie Q. DTML syntax

andres@corrada.com andres@corrada.com
Fri, 2 Jun 2000 11:19:44 -0400


On Fri, Jun 02, 2000 at 11:27:55PM +1000, Brad Moulton wrote:
> 
> tried
> ---------------
>    <dtml-in "PARENTS[0].objectValues(['job'])" sort=cust>
>   <dtml-if "_['sequence-item'].title == AUTHENTICATED_USER.getUserName()">
> <TR>
>     <TD rowspan="2" width="16%"><dtml-var
> j_number> ---------------------------
> and variations
> still no joy.....

Your problem is probably not related to AUTHENTICATED_USER.getUserName() but
something else. The following works for me:

<dtml-in "'nobody', 'webmaster'">
   
   <dtml-var sequence-item><br>
   <dtml-var AUTHENTICATED_USER><br>
   
   <dtml-if "_['sequence-item'] == AUTHENTICATED_USER.getUserName()">
      Success!<br>
   <dtml-else>
      Failure!<br>
   </dtml-if>
   
   <p>
</dtml-in>

Test sequence-item.title to make sure it is returning what you want.

------------------------------------------------------
Andres Corrada-Emmanuel   Email: andres@corrada.com
------------------------------------------------------