Skip to content

Instantly share code, notes, and snippets.

@l34marr
Last active December 20, 2015 19:18
Show Gist options
  • Save l34marr/6182005 to your computer and use it in GitHub Desktop.
Save l34marr/6182005 to your computer and use it in GitHub Desktop.
ChiNan Church News Folder Page Template.
<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="context/main_template/macros/master"
i18n:domain="plone">
<body>
<metal:content-core fill-slot="content-core">
<metal:block define-macro="content-core"
tal:define="kssClassesView context/@@kss_field_decorator_view;
getKssClasses nocall:kssClassesView/getKssClassesInlineEditable;
templateId template/getId">
<div metal:define-macro="text-field-view"
id="parent-fieldname-text" class="stx"
tal:define="kss_class python:getKssClasses('text',
templateId=templateId, macro='text-field-view');
has_text exists:context/aq_explicit/getText;
text python:has_text and here.getText() or ''"
tal:condition="text"
tal:attributes="class python:test(context.Format() in ('text/structured',
'text/x-rst', ), 'stx' + kss_class, 'plain' + kss_class)">
<div metal:define-slot="inside" tal:replace="structure text">The body</div>
</div>
<div class="news-title1">活動訊息</div>
<div class="news-area">
<tal:bulletin define="results python: context.portal_catalog(path={'query': '/church/news/bulletin'}, portal_type='Event', review_state='published')[:4]"
tal:repeat="item results">
<div class="news-item"
tal:define="objURL string:${item/getURL}/view;
objPath item/getPath;
title item/Title;">
<a href="url"
tal:attributes="href objURL"
tal:content="python: title or '(No title)'">Title</a>
</div>
</tal:bulletin>
</div>
<div class="news-title2">肢體交通</div>
<div class="news-area">
<tal:communion define="results python: context.portal_catalog(path={'query': '/church/news/communion'}, portal_type='Event', review_state='published')[:4]"
tal:repeat="item results">
<div class="news-item"
tal:define="objURL string:${item/getURL}/view;
objPath item/getPath;
title item/Title;">
<a href="url"
tal:attributes="href objURL"
tal:content="python: title or '(No title)'">Title</a>
</div>
</tal:communion>
</div>
<div class="news-title3">開會通知</div>
<div class="news-area">
<tal:meeting define="results python: context.portal_catalog(path={'query': '/church/news/meeting'}, portal_type='Event', review_state='published')[:4]"
tal:repeat="item results">
<div class="news-item"
tal:define="objURL string:${item/getURL}/view;
objPath item/getPath;
title item/Title;">
<a href="url"
tal:attributes="href objURL"
tal:content="python: title or '(No title)'">Title</a>
</div>
</tal:meeting>
</div>
<div class="news-title4">長執消息</div>
<div class="news-area">
<tal:board define="results python: context.portal_catalog(path={'query': '/church/news/board'}, portal_type='Event', review_state='published')[:4]"
tal:repeat="item results">
<div class="news-item"
tal:define="objURL string:${item/getURL}/view;
objPath item/getPath;
title item/Title;">
<a href="url"
tal:attributes="href objURL"
tal:content="python: title or '(No title)'">Title</a>
</div>
</tal:board>
</div>
<div class="news-title5">教界消息</div>
<div class="news-area">
<tal:christian define="results python: context.portal_catalog(path={'query': '/church/news/christian'}, portal_type='Event', review_state='published')[:4]"
tal:repeat="item results">
<div class="news-item"
tal:define="objURL string:${item/getURL}/view;
objPath item/getPath;
title item/Title;">
<a href="url"
tal:attributes="href objURL"
tal:content="python: title or '(No title)'">Title</a>
</div>
</tal:christian>
</div>
</metal:block>
</metal:content-core>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment