diff zpt/XML_schema_table.zpt @ 11:b8922e13e7b5

fixed xml templates to work with new data structures
author casties
date Wed, 11 Aug 2010 15:16:36 +0200
parents a9a49f5765c9
children c6c47034d2a4
line wrap: on
line diff
--- a/zpt/XML_schema_table.zpt	Wed Aug 11 14:49:27 2010 +0200
+++ b/zpt/XML_schema_table.zpt	Wed Aug 11 15:16:36 2010 +0200
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <table xmlns:tal="http://xml.zope.org/namespaces/tal" 
-  tal:define="fields options/data/names" tal:attributes="name options/tablename">
-  <row tal:repeat="row options/data">
-	<column tal:repeat="field fields" tal:attributes="name field" tal:content="python:row[field]"/>
+  tal:define="fields options/data/fields" tal:attributes="name options/tablename">
+  <row tal:repeat="row options/data/rows">
+	<column tal:repeat="col row" tal:content="python:col" tal:attributes="name python:fields[repeat['col'].index][0]"/>
   </row>
 </table>