掲示板

Is it possible to add a portlet dropzone inside of a custom portlet? 6.2

6年前 に Diogo Salazar によって更新されました。

Is it possible to add a portlet dropzone inside of a custom portlet? 6.2

Junior Member 投稿: 51 参加年月日: 13/08/28 最新の投稿
Hi to all,

I know it is possible to use <runtime-portlet> to embed a specific portlet to any other portlet jsp's files or to a web content template.

Instead, is it possible to add a portlet dropzone inside of a portlet's, let's say, view.jsp (in the likes of the nested portlet)?

Thanks.
thumbnail
6年前 に Andrew Jardine によって更新されました。

RE: Is it possible to add a portlet dropzone inside of a custom portlet? 6.

Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
Hi Diego,

That is an interesting question. I've never done it before but I don't see why not -- but I think HOW you solve it might depend a bit on your use case. My first question would be, are you hoping to have the same experience as adding portlets on regular pages? meaning you would add them to your "portlet layout" using the +ADD option that Liferay provides? or would your portlet encapsulate it's own add button that would reveal components to choose from?
6年前 に Diogo Salazar によって更新されました。

RE: Is it possible to add a portlet dropzone inside of a custom portlet? 6.

Junior Member 投稿: 51 参加年月日: 13/08/28 最新の投稿
Hi Andrew,

Thank you for your response.

My initial idea is to try and replicate whatever it is that the nested portlets is doing, except I'd prefer to use the same column layout as the one the page my portlet is sitting on is using -- the nested portlet portlet allows you to choose a column layout different to the one on the page.

If incorporating such functionality is indeed possible then I can't think why the regular ADD wouldn't work with that portlet dropzone (as it does with the nested portlet), and that would be my preference as opposed to managing it from within my portlet.

One of the things I've tried in the past (few years back) was to add a custom column layout to a nested portlet and embed that nested portlet inside of my custom portlet with the <runtime-portlet> tag. This time, however, I'd like to incorporate that 'dropzone' ability into my portlet directly.
thumbnail
6年前 に Andrew Jardine によって更新されました。

RE: Is it possible to add a portlet dropzone inside of a custom portlet? 6.

Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
So, if I understand correclty, what you are after is the same as what the nested portlet does, but rather than allow the user to select the layout they want to use, you want to default the portlet to use the layout that is the same as the page that is hosting the nested portlet. If that is the case, then why not just clone the nested portlet and instead of allowing users to configure the layout, just have the preference set to whatever the layout for the current page is? That way you can use all the (existing) nested portlet features with minimal change.

Or even better maybe -- hook the nested portlet and augment the configuration options to have a radio that allows users to choose the layout, or "inherit from page". That way you still only have to manage one portlet, but it becomes a little more flexible.
thumbnail
6年前 に Shivam Aggarwal によって更新されました。

RE: Is it possible to add a portlet dropzone inside of a custom portlet? 6.

Regular Member 投稿: 122 参加年月日: 12/01/18 最新の投稿
To add on to Andrew's suggestion,you can further have nested portlet be using layout from page by default and have the option for the user to switch to other layouts,open for selection as well.
So is this what you are looking for?
What is the final approach that you followed?
thumbnail
6年前 に Jack Bakker によって更新されました。

RE: Is it possible to add a portlet dropzone inside of a custom portlet? 6.

Liferay Master 投稿: 978 参加年月日: 10/01/03 最新の投稿
I did a bit of this where in preferences for a portlet, a content manager human could select from a list of filtered articles, an asset publisher, an image... which then are placed in a rectangle in view.jsp

not sure how a drop zone would work, and I've stayed away from nested portlets

it all got awkward to maintain, so I don't think I'll be doing that too much any more