Fórum

Make Media Gallery portlet "instanceable"

thumbnail
Joshua Messina, modificado 11 Anos atrás.

Make Media Gallery portlet "instanceable"

Junior Member Postagens: 30 Data de Entrada: 13/04/12 Postagens Recentes
I'm developing a collaboration site using liferay portal 6.1 tomcat, and I have a page where users would be able to access shared media. However, I wanted to make each media gallery portlet specific to a type of media, i.e. one for images, one for audio, one for video. The issue I am having is that I can't figure out how to make the Media Gallery portlet instanceable. I couldn't find a reference to the portlet in the liferay-portlet.xml file, and so I'm not really sure how to proceed. Can anyone help me with this?
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Make Media Gallery portlet "instanceable"

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
Check the following page. Search for "<instanceable>false</instanceable>" and read the explanation above.

http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/writing-the-my-greeting-portl-4
thumbnail
Joshua Messina, modificado 11 Anos atrás.

RE: Make Media Gallery portlet "instanceable"

Junior Member Postagens: 30 Data de Entrada: 13/04/12 Postagens Recentes
Hitoshi Ozawa:
Check the following page. Search for "<instanceable>false</instanceable>" and read the explanation above.

http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/writing-the-my-greeting-portl-4



I don't see how this helps me. The only thing it says about making portlets instanceable is this:

"First, we don't want multiple greetings on the same page, so we are going to make the My Greeting portlet non-instanceable. To do this, edit liferay-portlet.xml and change the value of the element instanceable from true to false so that it looks like this:

<instanceable>false</instanceable>"

That does not answer my question. I know that I need to add that tag (with the value "true", not "false") into the liferay-portlet.xml file, but I can't find a reference to that portlet in the file. I need to know where the reference to that portlet is so that I can add the instanceable tag. Please note that this is a portlet that came pre-installed on liferay, not one that I added.
Gowtham Mani, modificado 11 Anos atrás.

RE: Make Media Gallery portlet "instanceable"

Junior Member Postagens: 56 Data de Entrada: 26/11/08 Postagens Recentes
Hi Joshua,

The portlet name for media gallery is "31".
So you can add the <instanceable> tag to that particlar portlet tag

Hope this helps

Regards,
Gowtham
thumbnail
Joshua Messina, modificado 11 Anos atrás.

RE: Make Media Gallery portlet "instanceable"

Junior Member Postagens: 30 Data de Entrada: 13/04/12 Postagens Recentes
Unfortunately I already tried adding <instanceable> to this portlet. It did not work. If that is indeed the correct portlet then I'm not sure what is going wrong with my installation. Unfortunately I won't be able to test further until I rebuild my site.
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Make Media Gallery portlet "instanceable" (Resposta)

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
Just tried it on Liferay 6.1.0 GA1 Tomcat bundle and were able to put several Media Gallery on a page.

Check portlet-custom.xml file and search for "Media Gallery". You'll find the following tags implying the portlet-name is 31.

<portlet-name>31</portlet-name>
<display-name>Media Gallery</display-name>

Next, open up liferay-portlet.xml file and insert instanceable tag:
<use-default-template>false</use-default-template>
<instanceable>true</instanceable>
<scopeable>true</scopeable>
thumbnail
Joshua Messina, modificado 11 Anos atrás.

RE: Make Media Gallery portlet "instanceable"

Junior Member Postagens: 30 Data de Entrada: 13/04/12 Postagens Recentes
I guess it did work. I don't know what was wrong with it before. I had added that tag to portlet 31 a while ago. I don't know why it didn't work then. Anyway, thanks for the help.
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Make Media Gallery portlet "instanceable"

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
The order of the tags are important. If it's not in the right order, Liferay will throw exception during startup.
thumbnail
Joshua Messina, modificado 11 Anos atrás.

RE: Make Media Gallery portlet "instanceable"

Junior Member Postagens: 30 Data de Entrada: 13/04/12 Postagens Recentes
I did have it in the right order. I followed the dtd exactly. It just works now. I didn't actually change anything in that file.
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Make Media Gallery portlet "instanceable"

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
Nice to hear that you have it working now. I hope you'll be able to get your page setup now. emoticon