The problem is, say, i am having a page 开发者_开发知识库xyz
. And in that page there are 20 portlets. How can i find out the names of all portlets placed on the page.
Provided i am having the admin privilege.
In Liferay the easiest way to do this is probably in the theme, you want to get a hold of the Layout object, that will let you explore the layout and pull references to the portlets on a page.
Some references:
- http://www.liferay.com/community/wiki/-/wiki/Main/Layout%20Template#section-Layout+Template-AvailableVariablesInTemplate
- http://docs.liferay.com/portal/5.2/javadocs/portal-service/com/liferay/portal/model/Layout.html
The two portlet standards (JSR-168 and JSR-286) don't specify any way of finding out the names of the portlets placed on the page.
But, it is possible that each portal provides a proprietary way of achieving what you want to do.
精彩评论