Skip to content

Instantly share code, notes, and snippets.

@maethu
Created January 21, 2016 14:06
Show Gist options
  • Save maethu/cb8b60c18f0a51b969ea to your computer and use it in GitHub Desktop.
Save maethu/cb8b60c18f0a51b969ea to your computer and use it in GitHub Desktop.
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title></title></head>
<body>
<p tal:content="here/getBody_pre | nothing" />
<table style="width:800px; border: 1px solid grey">
<tr tal:repeat="field options/wrappedFields | nothing">
<th tal:content="field/fgField/widget/label" />
<td tal:content="structure python:field.htmlValue(request)" />
</tr>
<tr tal:define="filefields python: [field for field in here.fgFields() if field.getType() =='Products.Archetypes.Field.FileField']"
tal:repeat="field filefields">
<th tal:content="field/widget/label" />
<td tal:define="attachement python: here.REQUEST.get(field.getName() + '_file', None)"
tal:content="structure python: attachement and attachement.filename or ''" />
</tr>
</table>
<p tal:content="here/getBody_post | nothing" />
<pre tal:content="here/getBody_footer | nothing" />
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment