Posts Tagged ‘published content’

When was that PAGE modified?

Sunday, March 21st, 2010

Years ago, I had a requirement to add “Content Last Modified” text to ALUI portal pages being served as a public web site. When a portlet was updated, this text needed to automatically update and be displayed inline for each Published Content Announcement portlet. Of course, this is pretty straight-forward; we just needed to insert the following tag into the Publisher Presentation Template:

<div align=right>
  Item last published on
  <pcs:value expr="modified" format="MM/dd/yy">

The problem is, the portal isn’t a web site – it treats each portlet as an individual component on the page, so users aren’t really looking at the “page last modified” date, they’re looking at the “content item last modified” date. Get two Publisher portlets on the same page, and it looks a little weird with the “Last Published” date associated with the portlet showing up in the middle of the page: 

Recently, I came across a similar requirement for “Content Last Modified” text, but we wanted to avoid the text showing up more than once on pages with more than one portlet. The trick? Hit that “read” link.