Tuesday 22 May 2012

How to add admin portlets to Control panel for Liferay 6.1

Hello,
    Sometimes you need to use portlets from Administration at your portal public side. This post will describe how you can add such portlets to Control panel to be easelly added to portal pages.

     Let's add Users and Organisation portlet(User admin) to Control panel.
    1) First you need to do - is define portlet id, Users portlet has id 125.
    2) In your ext plugin override
            docroot\WEB-INF\liferay-display.xml
       and move
           <portlet id="125" />
       from category category.hidden to category.tools
    3) Add to portlet-ext.xml:

  
   125
   Users Admin
   com.liferay.portlet.StrutsPortlet
   
    view-action
    /users_admin/view
   
   0
   
    text/html
   
   com.liferay.portlet.StrutsResourceBundle
   
    administrator
   
   
    power-user
   
   
    user
   
  

    4) Override
            portal-impl/src/resource-actions/portal.xml
        in your ext plugin, find
            <portlet-name>125</portlet-name>
        and add
            <action-key>ADD_TO_PAGE</action-key>
        to supports block
  
    5) Redeploy ext plugin
    
Now you are able to add Users and Organisation portlet from Control panel

 
BR,
Paul        
       

No comments:

Post a Comment