icon

Web content Create Date Hook

icon
Mohd Danish
Data Modeling & Business Logic
Description
Some time we are having requirement that we need to upload the web content with some back date. For example one of our news based portals we were required to have an option that, user can change the create date of web content at the time of uploading.
We are going to use the Service hook. We are going to hook
com.liferay.portlet.journal.service.JournalArticleLocalService
We will use the expando bridge to get the latest created date from the user.
Create 2 custom fields as shown in the snap shots. The field name could be createDate(Date) and changeCreateDate(Boolean).
Else you can change the name and update them in the portlet.properties file.
##Specify the name of field specified in the custom fields..
1. Field to check if the user want to change the create date of a journal article or not (Boolean type)
override.change.create.date.field.name = changeCreateDate
2. Field to be scanned for the create date as set by the user (Date type)
create.date.field.name = createDate
These 2 fields will decide whether to update the create date or not.
Liferay is trademark of Liferay, Inc., Liferay International Limited and/or Liferay Affiliate, registered in the United States and/or other countries.
Release Summary and Release Notes
Version Change Log Supported Framework Versions Date Added
1
Liferay Portal 6.2 CE GA1+
Liferay Portal 6.2 EE GA1+
2014-06-24
DEVELOPER
Mohd Danish
Published Date
Version
1
Supported Versions
6.2
Edition
EE, CE
Price
Free
SHARE LINK

Installation Instructions

This is a Legacy App that is no longer available in the new App Marketplace. You are able to acquire it from your installed DXP or CE instance and install it by following the instructions below.

Acquiring this App through the legacy Liferay Portal Store

  1. Review app documentation for any specific installation instructions.
  2. Login to your Liferay Portal instance with administrative permissions.
  3. Navigate to the Control Panel, Marketplace (or Apps for 7.3 and prior), then Store.
  4. If needed, login to your Liferay.com account by choosing Sign In.
  5. Search for the app name in the Search dialog.
  6. Once the app is found, click on the app in the search results.
  7. On the app details page, choose to acquire the app by selecting the Free, Buy, or Trial button.
  8. Follow the instructions on the screen to complete the acquisition.

Installing this App through legacy Liferay Portal Purchased Apps

  1. After acquiring the app, login to your Liferay Portal instance with administrative permissions.
  2. Navigate to the Control Panel, Marketplace (or Apps for 7.3 and prior), then Purchased.
  3. If needed, login to your Liferay.com account by choosing Sign In.
  4. Click the Install button to install your app on your Liferay Portal instance.

See the legacy App Marketplace help documentation for more information.