Well, the generic method is to create a script that you call in the start of you ZPT that returns a dictionary with all the data to be displayed. This can also be the same script that actually does the deletion.
Well. This is not *the* generic method, its one of two patterns which have both their pros and cons. See the File Library example for doing it the other way round, calling the template at the end of the script:
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce