Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Group Last Modified View modes: 
User avatar
Member
Member
K-Guy - 1/9/2011 4:12:43 PM
   
Group Last Modified
A common 'complaint' I get from people using our site is that they cannot determine which groups have been updated since the last time they have logged in. As a result, they need to click on every one of their groups, one at a time, in order to see if there is any new content. This can be quite tedious if you're in many groups, and leads to decreased usage over time.

I would therefore like to add the date a group was last modified to the results displayed by the Groups Viewer webpart. Specifically, this is the last date that a new contribution was added to the group (to the group forum, messages, docs, etc.). This is not the date that the group administrator last updated the properties of the group.

Is it as simple as adding some code to the GroupsList transformation (Community - Transformations Document)? If so, please advise on how to do this.

Note: While I know this is probably very easy to accomplish, please keep in mind that I am a webmaster - not a developer. Thanks for helping a newb!

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 2/15/2011 5:26:53 PM
   
RE:Group Last Modified
Hi,

Not sure if you've found any solution yet...
Basically, the aim could be achieved using two ways:

The transformation could use some custom function - please see DevGuide - Adding custom functions to transformations
This function would get the current group's pages path (e.g. from GroupContext) and select TOP 1 document with newest date from under that path using API (selecting nodes). The document's last modification timestamp is in DocumentModifiedWhen field, so you could use it in order by expression. This would be the latest update.

Another way would be to catch update events (either in all places or better using event handler - custom TreeNode handler - see handling overview) and update parent group page document or the particular Group object so that it holds the latest timestamp itself for easy usage (displaying).

Hope this still helps

Regards,
Zdenek