Your question is a bit messy. Could you please pinpoint the problem a bit more? Did you know that there is a ZPT mailinglist for ZPT questions at zpt@zope.org and that I have put some DTML --> ZPT examples at http://www.zope.org/Members/peterbe ----- Original Message ----- From: "Jadran Prodan (E-mail)" <jadran.prodan@mtt-solutions.si> To: <zope@zope.org> Sent: Friday, July 13, 2001 10:04 AM Subject: [Zope] DTML-ZPT help
Hi,
Combination form page, answer page, script in DTML works but I have problem to translete it to ZPT. Thanks.
Lp, Jadran
-------------------------------- ---- DTML version ------ ------------------------------- -----add_form.html------ <html> <head></head> <body> <h1> Vnos novega ... </h1> <form action="xxx_action.html" method="POST"> <p> Naslov :<br> <textarea name="Naslov" rows="3" cols="60"></textarea> </p> <p> Opis :<br> <textarea name="Opis" rows="10" cols="60"></textarea> </p> <p> <input type="submit" value="Poslji ..."> </p> </form> </body> </html> ------xxx_action.html------- <dtml-var standard_html_header> <dtml-call expr="addEntry(Naslov, Opis)"> <h1>Uspesen vnos.</h1> <dtml-var standard_html_footer> -----addEntry----------- ------ parameters: naslov, opis
# create a unique document id id='entry_%d' % len(context.objectIds())
# create the document context.manage_addProduct['OFSP'].manage_addDTMLDocument(id, title=naslov, file=opis) -------------------------------- ---- ZPT version ------ ------------------------------- -----add_form.html------ <html> <head></head> <body> <h1> Vnos novega ... </h1> <form action="add_action.html" method="POST"> <p> Naslov :<br> <textarea name="Naslov" rows="3" cols="60"></textarea> </p> <p> Opis :<br> <textarea name="Opis" rows="10" cols="60"></textarea> </p> <p> <input type="submit" value="Poslji ..."> </p> </form> </body> </html> ------add_action.html------- <html> <head> <title tal:content="template/title">The title</title> </head> <body>
<h1 tal:define="nic python:here/addEntry(request/Naslov , request/Opis)"> Uspesen vnos.</h1>
<div> Dodan je bil "<span tal:content="request/Naslov">naslov ...</span>" z sledečim opisom:<br> <span tal:content="request/Opis"> opis ... </span> </div> </body> </html> -----addEntry----------- ------ parameters: naslov, opis
# create a unique document id id='entry_%d' % len(context.objectIds())
# create the document context.manage_addProduct['OFSP'].manage_addDTMLDocument(id, title=naslov, file=opis) --------------------------------
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )