"sequence-item.id" in python means sequence minus item.id. Also, you should use getId and not id. Use this: <dtml-if "check_id(_.getitem('sequence-item').getId())"> Florent Guillaume Nuxeo