[Checkins] SVN: plonetheme.zope2/trunk/plonetheme/zope2/skins/plonetheme_zope2_custom_templates/ added
Andreas Jung
andreas at andreas-jung.com
Wed Sep 2 06:53:28 EDT 2009
Log message for revision 103479:
added
Changed:
A plonetheme.zope2/trunk/plonetheme/zope2/skins/plonetheme_zope2_custom_templates/getZope2News.py
A plonetheme.zope2/trunk/plonetheme/zope2/skins/plonetheme_zope2_custom_templates/zope2-frontpage.pt
-=-
Added: plonetheme.zope2/trunk/plonetheme/zope2/skins/plonetheme_zope2_custom_templates/getZope2News.py
===================================================================
--- plonetheme.zope2/trunk/plonetheme/zope2/skins/plonetheme_zope2_custom_templates/getZope2News.py (rev 0)
+++ plonetheme.zope2/trunk/plonetheme/zope2/skins/plonetheme_zope2_custom_templates/getZope2News.py 2009-09-02 10:53:28 UTC (rev 103479)
@@ -0,0 +1,7 @@
+portal = context.portal_url.getPortalObject()
+
+query = dict(portal_type='News Item',
+ path='/'.join(portal.news.getPhysicalPath()))
+brains = portal.portal_catalog(**query)
+return [b.getObject() for b in brains]
+
Added: plonetheme.zope2/trunk/plonetheme/zope2/skins/plonetheme_zope2_custom_templates/zope2-frontpage.pt
===================================================================
--- plonetheme.zope2/trunk/plonetheme/zope2/skins/plonetheme_zope2_custom_templates/zope2-frontpage.pt (rev 0)
+++ plonetheme.zope2/trunk/plonetheme/zope2/skins/plonetheme_zope2_custom_templates/zope2-frontpage.pt 2009-09-02 10:53:28 UTC (rev 103479)
@@ -0,0 +1,40 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+ xmlns:tal="http://xml.zope.org/namespaces/tal"
+ xmlns:metal="http://xml.zope.org/namespaces/metal"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+ lang="en"
+ metal:use-macro="here/main_template/macros/master"
+ i18n:domain="plone">
+
+<body>
+
+<div metal:fill-slot="main">
+ <div id="front-page">
+ <h1>The Zope 2 Application Server</h1>
+ <p class="description">
+ Zope is a Python-based application server for building secure and large-scale web applications.
+ </p>
+
+ <tal:def define="newsitems context/getZope2News">
+ <div id="news" tal:condition="newsitems">
+ <h1>News</h1>
+ <tal:loop repeat="news newsitems">
+ <div class="news-item">
+ <a tal:attributes="href news/absolute_url">
+ <span class="headline">
+ <span tal:replace="python: context.toLocalizedTime(news.effective())" />:
+ <span tal:replace="news/Title" />
+ </span>
+ </a>
+ <div tal:content="news/Description" />
+ </div>
+
+ </tal:loop>
+ </div>
+ </tal:def>
+
+
+ </div>
+</div>
+</body>
+</html>
More information about the checkins
mailing list