changeset 278:51c43df418fc

xml export for features.
author casties
date Thu, 05 Mar 2015 19:18:56 +0100
parents d8a4ae8db589
children 572fcceebde8
files MPIWGFeature.py zpt/feature/feature_index_xml.zpt
diffstat 2 files changed, 28 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MPIWGFeature.py	Thu Mar 05 17:05:14 2015 +0100
+++ b/MPIWGFeature.py	Thu Mar 05 19:18:56 2015 +0100
@@ -29,6 +29,7 @@
     changeWeightForm = PageTemplateFile('zpt/feature/manage_change_weight', globals())
     changeForm = PageTemplateFile('zpt/feature/manage_config', globals())
     feature_main = PageTemplateFile('zpt/feature/feature_template', globals())
+    index_xml = PageTemplateFile('zpt/feature/feature_index_xml', globals())
 
     def __init__(self, id, title=None, weight=0, date=None, title_en=None, title_de=None, author=None, author_id=None):
         self.id = str(id)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/zpt/feature/feature_index_xml.zpt	Thu Mar 05 19:18:56 2015 +0100
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<feature xmlns:tal="http://xml.zope.org/namespaces/tal"
+  xmlns:metal="http://xml.zope.org/namespaces/metal">
+  <title>
+    <en tal:content="python:here.getFullTitle(lang='en')"/>
+    <de tal:content="python:here.getFullTitle(lang='de')"/>
+  </title>
+  <author>
+    <name tal:content="here/author|nothing"/>
+    <id tal:content="here/author_id|nothing"/>
+  </author>
+  <date tal:content="python:here.getDateString(lang='iso')"/>
+  <sort-weight tal:content="here/weight|string:0"/>
+  <frontpage>
+    <image tal:content="here/getFrontpageImgUrl"/>
+    <teaser>
+      <en tal:content="python:getattr(here.en.get('teaser.pt'), 'source.html')(request, request.response)"/>
+      <de tal:content="python:getattr(here.de.get('teaser.pt'), 'source.html')(request, request.response)"/>
+    </teaser>
+  </frontpage>
+  <mainpage>
+    <main>
+      <en tal:content="python:getattr(here.en.get('main.pt'), 'source.html')(request, request.response)"/>
+      <de tal:content="python:getattr(here.de.get('main.pt'), 'source.html')(request, request.response)"/>
+    </main>
+  </mainpage>  
+</feature>
\ No newline at end of file