portlet_recentソース
カスタマイズした「最近の公開」portlet(portlet_recent)のソースファイルです。
サイズ 2.0 kB - File type text/plainファイルのコンテンツ
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
i18n:domain="plone">
<body>
<!-- The Recent Items box -->
<div metal:define-macro="portlet">
<tal:recentlist tal:define="results python:request.get('items',
here.portal_catalog.searchResults(sort_on='modified',
sort_order='reverse',
review_state='published')[:10]);">
<div class="portlet" id="portlet-recent">
<h5 i18n:translate="box_recentitems">Recent Items</h5>
<div class="portletBody">
<tal:block tal:repeat="obj results">
<div tal:define="oddrow repeat/obj/odd"
tal:attributes="class python:test(oddrow, 'portletContent even', 'portletContent odd')">
<img src="" alt="" style="border: 0"
tal:attributes="src obj/getIcon;
alt obj/Type" />
<a href="/view" title="title"
tal:content="obj/Title"
tal:attributes="href obj/getURL;
title obj/Description">
Title</a>
<span class="discreet" tal:replace="obj/ModificationDate" />
</div>
</tal:block>
<div class="portletContent odd" tal:condition="not: results"
i18n:translate="box_recently_no_items">
No items published or changed since your last log-in.
</div>
<div class="portletContent odd">
<a href=""
class="portletMore"
tal:attributes="href string:${portal_url}/recently_published"
i18n:translate="box_morelink"
>
More...
</a>
</div>
</div>
</div>
</tal:recentlist>
</div>
</body>
</html>
Click here to get the file