[Zope] Equality test: if sequence-item = document id
E. Seifert
e.seifert@gmx.net
Fri, 1 Jun 2001 14:36:04 +0200
Hi Garry,
you wrote:
> i have the following code which works fine:
>
> <dtml-in "PARENTS[0].objectIds('DTML Document')">
> <dtml-if expr="_['sequence-item']=='index_html'">
> <li><dtml-var sequence-item>
> <dtml-else>
> </dtml-if>
> </dtml-in>
>
> but i would like to replace 'index_html' with the document's id
> variable, something like this:
>
> <dtml-in "PARENTS[0].objectIds('DTML Document')">
> <dtml-if expr="_['sequence-item']=='this().id'">
> <li><dtml-var sequence-item>
> <dtml-else>
> </dtml-if>
> </dtml-in>
>
> which of course doesn't work, but i'm not sure why or what i need
> instead!
Did you try the getId() method?
Regards
Eric