留言板

Programmatically Find Last Update for a Page

thumbnail
Jacob Caniparoli,修改在10 年前。

Programmatically Find Last Update for a Page

Junior Member 帖子: 27 加入日期: 10-6-22 最近的帖子
Is it possible to use the 6.0.5 API to find out the last time a page was edited? I have some code that gets each of the layouts for a group. Layouts are synonymous with pages unless I'm mistaken. But now that I have these layouts, is it possible to go through and find out the last time they were edited?

Thanks.


    //Get lists of public pages and private pages
	privatePages = LayoutLocalServiceUtil.getLayouts(group.getGroupId(), true);
	publicPages = LayoutLocalServiceUtil.getLayouts(group.getGroupId(), false);

    //Now what?
thumbnail
Krzysztof Gołębiowski,修改在10 年前。

RE: Programmatically Find Last Update for a Page

Liferay Master 帖子: 549 加入日期: 11-6-25 最近的帖子
Hello Jacob,
Each layout object has a field called "modified date" which contains the date of last modification (that includes arranging portlets on page) emoticon You can get it with layout.getModifiedDate().

Regards,
KG
thumbnail
Jacob Caniparoli,修改在10 年前。

RE: Programmatically Find Last Update for a Page

Junior Member 帖子: 27 加入日期: 10-6-22 最近的帖子
Maybe I'm just missing something, but I don't see where getModifiedDate() is in the API. I'm looking at this page: http://docs.liferay.com/portal/6.0/javadocs/com/liferay/portal/model/Layout.html
Keep in mind, we are still on 6.0...

Thanks.
thumbnail
Krzysztof Gołębiowski,修改在10 年前。

RE: Programmatically Find Last Update for a Page

Liferay Master 帖子: 549 加入日期: 11-6-25 最近的帖子
Hmm, I think you are right. I checked portal service.xml from 6.0.6 sources and the field is missing. They must have introduced createDate and modifiedDate in version 6.1. Thus I don't know think if there is any possibility to check this on 6.0 emoticon

Regards,
KG