[Zope] Delete multiple posts
Jan Lentfer
Jan@MountainbikeHQ.de
Tue, 3 Apr 2001 11:07:49 +0200
Am Dienstag, 3. April 2001 10:21 schrieb Gitte Wange:
> Well I'm sorry to say this, but it seems a bit more complicated than
> what I need. Isn't it possible to make an array out of a select box
> (with only the selected items in the array) and just run through this
> array to delete the items ?
>
> Gitte
I don't have time to explain it, but maybe this snippets from my code can
help you:
First part, display the items in a table:
---------------------------
<FORM action="board_delProcessor" mehtod=post>
<TABLE border=1 width=75% align=center bgcolor="lightgrey"
bordercolorlight="#999999" bordercolordark="#666666" cellspacing="1"
cellpadding="8">
<dtml-with entries>
<dtml-in "objectValues(['Message Board Entry'])">
<dtml-var manage_html>
</dtml-in>
</dtml-with>
</TABLE>
[...]
Second part, manage_html
-------------------
<TR>
<TD align="center" width ="5%"><INPUT type ="checkbox" name="delID"
value="<dtml-var id>"></TD>
<TD align="left" width ="20%"><dtml-var message_subject></TD>
<TD align="left" width ="5%"><dtml-var author></TD>
<TD align="left" width ="5%"><FONT size=-2><dtml-var
post_date></FONT></TD>
</TR>
Third part, the board_delProcessor
-------------------------
<dtml-with entries>
<dtml-call "REQUEST.set('delObj',delID)">
<dtml-call "manage_delObjects(delObj,REQUEST)">
</dtml-with>
This works on my message board management also for multiple posts
hth,
Jan
--
Jan@MountainbikeHQ.de
http://www.MountainbikeHQ.de - Your home for DH, DS and CC Mountainbiking