Fórumok

Ho to enable "show add application" in custom made layout type?

Koen Cleynhens, módosítva 13 év-val korábban

Ho to enable "show add application" in custom made layout type?

Junior Member Bejegyzések: 83 Csatlakozás dátuma: 2010.02.23. Legújabb bejegyzések
Hello I made a custom layout type (based on the one of portlets)

But I see now that I don't be able to add a new application.

I checked it out and debugged it, and I see that there is a property showAddApplicationItem. But this property is only set to true in a preservice method if layout type is portlets.

Anybody knows how to modify this?
thumbnail
Ivan Cheung, módosítva 13 év-val korábban

RE: Ho to enable "show add application" in custom made layout typ

Regular Member Bejegyzések: 113 Csatlakozás dátuma: 2006.06.20. Legújabb bejegyzések
Hi,

It would help if you specified what you mean by "layout type". In the portal, you have page layout templates, and perhaps some other components that refer to layout.

What do you mean that you can't add a new application? You can't add a portlet to the page?
Koen Cleynhens, módosítva 13 év-val korábban

RE: Ho to enable "show add application" in custom made layout typ

Junior Member Bejegyzések: 83 Csatlakozás dátuma: 2010.02.23. Legújabb bejegyzések
Yep I cannot add a new Portlet in this layout type.

And the reason is that in the code of Liferay there is a check to see if the menu item "add application" is allowed for the layout type. And the only layout type where it is allowed is hardcoded specified in the code (unbelievable in my point of view)
Lior Hadaya, módosítva 11 év-val korábban

RE: Ho to enable "show add application" in custom made layout typ

Regular Member Bejegyzések: 138 Csatlakozás dátuma: 2012.01.24. Legújabb bejegyzések
Hi, I'm facing the same problem

Did you ever manage to find a solution?

Thanks
thumbnail
Pinkesh Gandhi, módosítva 11 év-val korábban

RE: Ho to enable "show add application" in custom made layout type?

Junior Member Bejegyzések: 99 Csatlakozás dátuma: 2012.01.27. Legújabb bejegyzések
Can you verify that you have logged in with Admin rights before you are trying to add portlet on page.
Lior Hadaya, módosítva 11 év-val korábban

RE: Ho to enable "show add application" in custom made layout type?

Regular Member Bejegyzések: 138 Csatlakozás dátuma: 2012.01.24. Legújabb bejegyzések
Yes, absolutely. I log in with the the administrator account, I can add portlets to regular pages of type "portlet".
thumbnail
Pinkesh Gandhi, módosítva 11 év-val korábban

RE: Ho to enable "show add application" in custom made layout type?

Junior Member Bejegyzések: 99 Csatlakozás dátuma: 2012.01.27. Legújabb bejegyzések
Please go through the steps mentioned in this link to create custom layout type.

I hope it may helps you.
Lior Hadaya, módosítva 11 év-val korábban

RE: Ho to enable "show add application" in custom made layout type?

Regular Member Bejegyzések: 138 Csatlakozás dátuma: 2012.01.24. Legújabb bejegyzések
That's exactly what I did.
I was able to create a custom layout type and I can see my new layout type in the create/manage page dialog just fine.
layout.types=portlet,panel,embedded,article,url,link_to_layout,my_new_layout

layout.edit.page[my_new_layout]=
layout.view.page[my_new_layout]=/portal/layout/view/portlet.jsp
layout.url[my_new_layout]=${liferay:mainPath}/portal/layout?p_l_id=${liferay:plid}
layout.url.friendliable[my_new_layout]=true
layout.parentable[my_new_layout]=true
layout.sitemapable[my_new_layout]=false
layout.configuration.action.updatemy_new_layout]=true 


The problem is that when I click the +Add link on the upper dockbar in order to add portlets to my page (which is of my_new_layout type) the menu only shows the add page link. It won't show the applications/portlets.

It seems that Liferay's implementation set hard-coded that portlets can only be added to pages of the portlet layout type.
My question is - is there any way to work around this?

Thanks
thumbnail
Pinkesh Gandhi, módosítva 11 év-val korábban

RE: Ho to enable "show add application" in custom made layout type?

Junior Member Bejegyzések: 99 Csatlakozás dátuma: 2012.01.27. Legújabb bejegyzések
Can you please try with following properties

     layout.edit.page[my_new_layout]=/portal/layout/edit/portlet.jsp
     layout.view.page[my_new_layout]=/portal/layout/view/portlet.jsp
     layout.url[my_new_layout]=${liferay:mainPath}/portal/layout?p_l_id=${liferay:plid}&p_v_l_s_g_id=${liferay:pvlsgid}
     layout.url.friendliable[my_new_layout]=true
     layout.parentable[my_new_layout]=true
     layout.sitemapable[my_new_layout]=true	
     layout.first.pageable[my_new_layout]=true	


I hope it may works for you.
Lior Hadaya, módosítva 11 év-val korábban

RE: Ho to enable "show add application" in custom made layout type?

Regular Member Bejegyzések: 138 Csatlakozás dátuma: 2012.01.24. Legújabb bejegyzések
Hi,
Thanks for your assistance, I tried your suggested properties but it did not help. The situation is the same.

I really think this is something that's hard-coded into Liferay, it doesn't matter how I configure my custom layout type properties.
Can someone confirm this? is there any way I can use a hook or something to override this behavior?

Thanks