Mercurial > hg > ChinaGisRestApi
view zpt/HTML_index.zpt @ 44:c6c47034d2a4
more refactoring of templates
gis can be rendered by pagetemplate
author | casties |
---|---|
date | Thu, 02 Sep 2010 16:38:50 +0200 |
parents | 76ac7a721273 |
children | ed8db63fab4f |
line wrap: on
line source
<html tal:define="layout python:request.get('layout','table'); element_id python:request.get('element_id',None)"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title tal:content="template/title">The title</title> </head> <body> <h2>List of schemas</h2> <tal:block tal:condition="python:layout=='select'"> <select tal:attributes="id element_id"> <option tal:repeat="sch options/data/data" tal:content="sch"/> </select> </tal:block> <tal:block tal:condition="python:layout=='table'"> <table tal:attributes="id element_id"> <tr tal:repeat="row options/data/rows"> <td><a tal:define="sch python:row[0]" tal:attributes="href sch" tal:content="sch"/></td> </tr> </table> </tal:block> </body> </html>