Meet The Author

I'm Jitendra Rajput (Senior Consultant @ CIGNEX Datamatics) , A Programmer , Blogger , Technology Enthusiast and apart from this interested in making new friends , love music and love to play CHESS. Expressing my thoughts using blog.

author

Popular Asset Portlet Liferay

Leave a Comment
As name suggest this app will help users to find out popular assets of Liferay. This app supports Journal Article , Blogs , Document and Media .
User can configure any of the asset listed above and they can find out most viewed , most rated , most commented and recently added asset in Liferay.

For asset like Journal article user can also track where Journal Article is configured. User can check preview of Journal Article as well.



Supported Configuration


Maximum Article To Display 

User can decide how many record they want to see. i.e if user set this it 10 then application will display popular 10 records for selected asset.

Asset 

From the new version user can configuration others assets like Blogs , Document media and Wiki along with Journal Article.

Scope 

There are 2 options supported for scope field 1) Company and 2) Current

1) Company
- It means application will gather information from current portal instance . Application will gather information from all the sites available under current company.

2) Current
- If user mark Current for scope field then assets from current site will be displayed to user.

View

There are two option supported for this field 1) Table and 2) Chart.

1) If user select 1 st option as table then all information will be displayed in tabular manner.

2) If user set view as chart then all information will be presented to user in form of chart.


Here are few screen shot to understand more about this application.

Table View


Chart View




Configuration Screen


Liferay Search Container

1 comment
I have posted couple of articles related to sort search container results in Liferay.

You can refer to my blog post Orderable Search Container In Liferay to sort database results using Liferay search container.

If you want to sort results coming from solr using search container then refer to this blog post Sort Solr Results Using Search Container.


But what if you don't have any database/solr results and still you want to user Liferay search container ? . For example let say if  you List<Long>  and you want to display the same using Liferay search container.


Read Portlet Preferences in Liferay

Leave a Comment
We know how to get preferences of current portlet from request object (renderRequest.getPreferences()) but some time we have requirement to read preferences of remote portlet placed on some other page.


Using PortletPreferenceLocalServiceUtil we can read preference of any portlet. We just need to take care while passing parameter like OWNER_ID ,OWNER_TYPE , Plid , and Default Preferences.


If the preferences are unique per group 

OWNER_ID : PortletKeys.PREFS_OWNER_TYPE_GROUP

OWNER_TYPE : If the preferences are unique per group (Shared preferences between portlet placed on multiple page within same group) then pass groupId as OWNER_TYPE.

Plid : 0  (PortletKeys.PREFS_PLID_SHARED).

PortletId : PortletId of remote portlet.

If the preferences are unique per layout

OWNER_ID : PortletKeys.PREFS_OWNER_TYPE_LAYOUT

OWNER_TYPE : 0

Plid : Pass Plid of page where remote portlet is placed. If Blog portlet is placed on "/home" page then pass plid of "/home" page.

PortletId : PortletId of remote portlet.

Below is the example to read preferences of remote portlet.


In case if you are using any other method of PortletPreferecesLocalServiceUtil which returns com.liferay.portal.model.PortletPreferences instead of javax.portlet.PortletPreferences then using below code you can do the converstion from com.liferay.portal.model.PortletPreferences to javax.portlet.PortletPreferences.

Content Filtering By User Custom Attribute in Asset Publisher

Leave a Comment
This post will help you to configure assets based on user's custom attribute.

Steps are already available in LPS-19681 but in case if you face any difficulty while configuring the same you can follow this post.

Scenario 

Filter content based on user's custom attribute. If user A logged in from India then asset publisher to display contents for India. If user B logged in from USA then asset publisher to display content from USA.


Step 1 :

Create custom attribute for user with the type Text and name it as "Location".


Read more »

Portlet Location Tracker - v1.1 Released for Liferay 6.2 and Liferay 6.1

Leave a Comment
I am pleased to share that Portlet Location Tracker v1.1 has been released .

New release of Portlet Location Tracker now supports Liferay 6.2 as well.  In the v1.1 of Portlet Location Tracker we have added functionality to remove portlet from page.

Now user can remove any portlet from page in one shot using Portlet Location Tracker.

No need to browse pages to remove portlet just use Portlet Location Tracker , search for your portlet and from results remove from portlet from desired page.




Thank you ,
Jitendra Rajput
Consultant @ CIGNEX Datamatics 
Previous PostOlder Posts Home