Remove Creation Date From Items in the News Portlet
Since news items do not have a date associated with them, the only date to show on the news portlet is the date that the news item was created. This causes confusion if you are announcing news for an upcoming event and the dates aren't the same. This How-To will walk you through changing the portlet to simply remove the date from the display.
This How-To require manager-level access to your Plinkit site. Please read the instructions very carefully as you will be working in the ZMI of your site. Please only make changes to items listed in these instructions. If you don't have a manager-level account, you will need to contact your regional Plinkit coordinator for your library system to set it up for you.
- Log into your Plinkit site with a manager-level account. You will know you have manager access if you see the "Site Setup" link in the upper-right corner of your site.
- Click the "Site Setup" link in the upper-right corner of your site.
- Click the "Zope Management Interface" link. This will open the ZMI for your site. Please follow the next instructions very carefully.
- Scroll down until you find: "portal_skins (Controls skin behaviour (search order etc)" and click on it.
- Click the "plinkit_custom" folder.
- From the drop-down menu on the right side of your screen, where it reads "ATContentTypes Tools", select "Page Template" from the drop-down menu and click "Add". When you click "Page Template" it may automatically select the "add" function.
- In the ID Field type exactly: portlet_news
- Click "Add and Edit". You will see the following screen:

- You will see in the body of the page some <html> and <head> tags. Highlight everything in the text window and delete it.
- Copy all the text in the below blue box by highlighting it and copying it to your clipboard (Ctrl-C) and pasting it into the now empty text window (Ctrl-V)
-
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
i18n:domain="plone">
<body>
<div metal:define-macro="portlet"
tal:define="results python:request.get('news',
here.portal_catalog.searchResults(portal_type='News Item',
sort_on='Date',
sort_order='reverse',
review_state='published')[:5]);"
tal:condition="python:test(template.getId()!='news' and results, 1, 0)">
<dl class="portlet" id="portlet-news">
<dt class="portletHeader">
<span class="portletTopLeft"></span>
<a href="#"
class="tile"
tal:condition="python:'news' in portal.contentIds()"
tal:attributes="href string:${utool}/news"
i18n:translate="box_news">News</a>
<a href="#"
class="tile"
tal:condition="python:'news' not in portal.contentIds()"
tal:attributes="href string:${utool}/news_listing"
i18n:translate="box_news">News</a>
<span class="portletTopRight"></span>
</dt>
<tal:newsitems tal:repeat="obj results">
<dd tal:define="oddrow repeat/obj/odd"
tal:attributes="class python:test(oddrow, 'portletItem even', 'portletItem odd')">
<a href=""
class="tile"
tal:attributes="href obj/getURL;
title obj/Description">
<tal:block replace="structure here/newsitem_icon.gif"/>
<span tal:replace="obj/pretty_title_or_id">
Plone 2.1 announced!
</span>
</a>
</dd>
</tal:newsitems>
<dd class="portletFooter">
<a href=""
class="tile"
tal:condition="python:'news' in portal.contentIds()"
tal:attributes="href string:${utool}/news"
i18n:translate="box_more_news_link"
>
More news…
</a>
<a href=""
class="tile"
tal:condition="python:'news' not in portal.contentIds()"
tal:attributes="href string:${utool}/news_listing"
i18n:translate="box_more_news_link"
>
More news…
</a>
<span class="portletBottomLeft"></span>
<span class="portletBottomRight"></span>
</dd>
</dl>
</div>
</body>
</html> - Click "Save Changes"
- The changes are now made. You can go back to your website in another window and see if it is working. If you get unexpected results, simply delete the "portlet_news" item you created and everything will start back where it was to begin with.
- Close the ZMI by closing your browser.