user2538889
user2538889

Reputation: 23

How to add a custom portlet on control panel in user profile page?

I need to add a custom portlet in Liferay 6.1.1 CE in Control Panel. I tried this but it does't work:

<portlet>
   <portlet-name>testPortlet</portlet-name>
    <icon>/images/default.png</icon>
    <control-panel-entry-category>content</control-panel-entry-category>
    <layout-cacheable>true</layout-cacheable>
    <add-default-resource>true</add-default-resource>
</portlet>

My portlet's name is "testPortlet", can anyone help me? I read a lot on many forums but i got nothing to help me.

Upvotes: 2

Views: 1640

Answers (1)

Laxman Rana
Laxman Rana

Reputation: 2924

In your portlet's liferay-portlet.xml

<portlet>
    <portlet-name>MyCustomPortlet</portlet-name>
    <icon>/mycustom.png</icon>
    <control-panel-entry-category>portal</control-panel-entry-category>
    <control-panel-entry-weight>100</control-panel-entry-weight>
    <instanceable>false</instanceable>
    <header-portlet-css>/css/main.css</header-portlet-css>
    <footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
    <css-class-wrapper>customportlet-portlet</css-class-wrapper>
</portlet>

For more info

Let me know if you have any problem

Upvotes: 2

Related Questions