Fórumok

New Section in ControlPanel

Deepjyoti Nath, módosítva 13 év-val korábban

New Section in ControlPanel

Junior Member Bejegyzések: 86 Csatlakozás dátuma: 2010.11.02. Legújabb bejegyzések
Hi,
Is it possible to add a new Section under control panel? By default when an adminstrator goes to control panel, he can see portlets under Content, Portal and Server sections. Is it possible to add a custom section under which custom user created portlets can be put? If yes can anyone please provide a solution?

Thanks in advance!!!
thumbnail
Piotr Filipowicz, módosítva 13 év-val korábban

RE: New Section in ControlPanel

Junior Member Bejegyzések: 52 Csatlakozás dátuma: 2010.11.18. Legújabb bejegyzések
Hi!
It's possible to add custom section in control panel.
The simpliest way is create ext environment in your project and override com.liferay.portal.util.PortletCategoryKeys util.

For example add Test section:

public static final String TEST = "test";
public static final String[] ALL = {MY, CONTENT, PORTAL, SERVER, TEST};


Then you go into your specific portlet and put <control-panel-entry-category>test</control-panel-entry-category> in liferay-portlet.xml

--
Best regards,
Piotr Filipowicz
Deepjyoti Nath, módosítva 13 év-val korábban

RE: New Section in ControlPanel

Junior Member Bejegyzések: 86 Csatlakozás dátuma: 2010.11.02. Legújabb bejegyzések
Hi Piotr,

Thnaks for your reply. Now my custom section is coming in the Control Panel. But instead of Test, the section is coming as "category.test". How this "category" has been appended?

Thanks again.
thumbnail
Piotr Filipowicz, módosítva 13 év-val korábban

RE: New Section in ControlPanel

Junior Member Bejegyzések: 52 Csatlakozás dátuma: 2010.11.18. Legújabb bejegyzések
Hello again!
This is easy. Put the key category.<your_category_name> in Language.properties or Language_<your country>.properties.

--
Piotr Filipowicz
thumbnail
Piotr Filipowicz, módosítva 13 év-val korábban

RE: New Section in ControlPanel

Junior Member Bejegyzések: 52 Csatlakozás dátuma: 2010.11.18. Legújabb bejegyzések
Sory, I read your post in a hurry.

Deepjyoti Nath:
How this "category" has been appended?



"Category" is append in file: portal/portal-web/docroot/html/portlet/control_panel_menu/view.jsp

title = LanguageUtil.get(pageContext, "category." + curCategory);


--
Piotr Filipowicz
thumbnail
Mati Khan, módosítva 13 év-val korábban

RE: New Section in ControlPanel

Junior Member Bejegyzések: 25 Csatlakozás dátuma: 2010.11.01. Legújabb bejegyzések
Hi,

Can you tell me where you placed the package com.liferay.portal.util in ext-plugin

in ext-impl or ext-service

And example will be good to implement it.

Thanks.
thumbnail
Piotr Filipowicz, módosítva 13 év-val korábban

RE: New Section in ControlPanel

Junior Member Bejegyzések: 52 Csatlakozás dátuma: 2010.11.18. Legújabb bejegyzések
This is very good question. This class should be in the portal-service package. But in the ext plugin you cannot override PortletCategoryKeys. This is not as easy as I thought. So, you'll need change your liferay source?!?

Who can give us better way?
Daniel Lipski, módosítva 12 év-val korábban

RE: New Section in ControlPanel

New Member Bejegyzések: 3 Csatlakozás dátuma: 2011.04.13. Legújabb bejegyzések
Hi,

I got exactly the same issue. Have you found solution for this ?

Reagrds
Daniel
thumbnail
Tomas Polesovsky, módosítva 12 év-val korábban

RE: New Section in ControlPanel

Liferay Master Bejegyzések: 676 Csatlakozás dátuma: 2009.02.13. Legújabb bejegyzések
Hi,

I don't know which version do you use - so take it as a tutorial emoticon

You'll need to use Ext Plugin.

1, in liferay source of your version find ./portal-impl/src/com/liferay/portal/util/PortalImpl.java and search for lines with PortletCategoryKeys.ALL.
2, create new class MyPortalImpl that extends PortalImpl and override the methods you find (replace PortletCategoryKeys.ALL with new String[]{....})
3. using your ext-spring.xml redefine bean: <bean id="com.liferay.portal.util.Portal" class="xxx.MyPortalImpl" />
4, copy portal-web/docroot/html/portlet/control_panel_menu/view.jsp from liferay sources into ext-web/docroot/html/portlet/control_panel_menu/view.jsp and change
String[] allCategories = PortletCategoryKeys.ALL;
into
String[] allCategories = new String[]{....}


I think this way could work.
thumbnail
Apoorva Prakash, módosítva 12 év-val korábban

RE: New Section in ControlPanel

Liferay Master Bejegyzések: 658 Csatlakozás dátuma: 2010.06.15. Legújabb bejegyzések
Hi all,
In my case, making category entry in language-ext.properties worked.
So why it is needed to modify the view.jsp of control panel, I can't understand.
Thanks
Nguyen Hong Duy Anh, módosítva 9 év-val korábban

RE: New Section in ControlPanel

New Member Bejegyzések: 2 Csatlakozás dátuma: 2014.09.17. Legújabb bejegyzések
I want set permission for my custom portlet in custom section I was created. I don't see my portlet in Add Permission select menu. I think because my portlet put in my custom section. I see the icon of my custom section is a User icon. So, how do I set permission for my custom section like a content section. I want add permission for my custom portlet in custom section.
Sr for my english.
Thanks
Deepjyoti Nath, módosítva 13 év-val korábban

RE: New Section in ControlPanel

Junior Member Bejegyzések: 86 Csatlakozás dátuma: 2010.11.02. Legújabb bejegyzések
Thanks man!!!