[Zope] DTML to ZPT: insert db info and variables help

Kevin Carlson khcarlso@bellsouth.net
Mon, 24 Feb 2003 21:39:14 -0500


I haven't tested these, but this should point you in the right 
direction.  I think the main thing you're looking for is the 
"tal:attributes" attribute.

Kevin

Wayne Connolly wrote:

>
> <a href=update?item=<dtml-var product>>Edit <dtml-var
> product></a>

<a href="whatever" tal:attributes="href 
string:update?item=${here/product}" tal:content="string:Edit 
${here/product}">Edit</a>

>
> <dtml-in zSQLMethod>
> <form method="post" action="update_files"
> enctype="multipart/form-data">
>
>
> <input type="hidden" name=product_title
> value="<dtml-var product_title null="">"
> </form>
> <dtml-in>

<div tal:define="inData here/zSQLMethod">
<form method="post" action="update_files" enctype="multipart/form-data">
<input type="hidden" name="whatever" value="whatever" 
tal:attributes="name python:inData[0].product_title; value 
python:inData[0].product_title">
</form>
</div>

Hope that helps,

Kevin