BUG: weird acquisition problem with <dtml-if>
Hi, I think I have found a bug in Zope 2.1.6. I have the following code which is <dtml-var Code> included into every document on my server. If the document (docid) is *acquired* then the code below works as expected. If the document is *not acquired* then the <dtml-if "id == compare_inner"> line needs to be changed to: <dtml-if "id() == compare_inner()"> for the compare to work. If I display the values using: <!-- <dtml-var id> == <dtml-var compare_inner> --> I get the appropiate values for both document types If I display the values using: <!-- <dtml-var "id"> == <dtml-var "compare_inner"> --> I get the incorrect behaviour described above. This mafests itself as <Python Method 13e31b0> when it fails How can I get the effect of a <dtml-var compare_inner> within a <dtml-if> which by its nature only uses the quoted form? --------------------------------------- Code ------------------------------------------------------- <dtml-call "REQUEST.set('docid', id)"> ... <dtml-if "_.len(PARENTS) >= 3"> <dtml-call "REQUEST.set('compare_inner', PARENTS[-3].id)"> <dtml-else> <dtml-call "REQUEST.set('compare_inner', docid)"> </dtml-if> <dtml-in "PARENTS[-2].objectValues(['Folder', 'DTML Document'])"> <dtml-if "AUTHENTICATED_USER.has_permission('View', _.getitem('sequence-item', 0))"> <!-- <dtml-var id> == <dtml-var compare_inner> --> <dtml-if "id == compare_inner"> <dtml-var title_or_id> --> <dtml-else> <a href="<dtml-var absolute_url>"><dtml-var title_or_id></a> </dtml-if> </dtml-if> </dtml-in> ---------------------------------------------------------------------------------------------------------------------------------------- Thanks Anthony Pfrunder PS: Please CC to my mailbox as I'm not subscribed to the Zope mailing list. __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/
participants (1)
-
Anthony Pfrunder