Fórum

Embed portlet in layout using Liferay 6.1.1

thumbnail
Jignesh Vachhani, modificado 11 Anos atrás.

Embed portlet in layout using Liferay 6.1.1

Liferay Master Postagens: 803 Data de Entrada: 10/03/08 Postagens Recentes
Hi Everyone,

I am trying to put navigation portlet in my layout.
Now i am using below code to embed navigation portlet in layout :

$theme.runtime("71_INSTANCE_MAIN", "", $velocityPortletPreferences.toString())

So portlet is being embedded but out side of layout div tags .
Does anybody have any idea ? Is this Liferay OOB error ?
thumbnail
Jignesh Vachhani, modificado 11 Anos atrás.

RE: Embed portlet in layout using Liferay 6.1.1 EE GA2

Liferay Master Postagens: 803 Data de Entrada: 10/03/08 Postagens Recentes
I think I found the issue is ,



1) When i am using $processor.processPortlet

Ans : I used $processor.processPortlet("71_INSTANCE_MAIN") to embed portlet in layout .tpl file
but it can not read this.
I dig the code and found that it seems to be problem in Liferay Code TemplateProcessor.java class
In this class,processPortlet method seems to be using wrong portlet id @ 175 line number. (See below code)

public String processPortlet(String portletId) throws Exception {
		try {
			_request.setAttribute(
				WebKeys.RENDER_PORTLET_RESOURCE, Boolean.TRUE);

			return RuntimePortletUtil.processPortlet(
				_servletContext, _request, _response, null, null, [b]_portletId[/b],
				null, false);
		}
		finally {
			_request.removeAttribute(WebKeys.RENDER_PORTLET_RESOURCE);
		}
	}


2) When i am using $theme.runtime
Its rendering the code outside of layout and trying to find out the solution
thumbnail
Jignesh Vachhani, modificado 11 Anos atrás.

RE: Embed portlet in layout using Liferay 6.1.1

Liferay Master Postagens: 803 Data de Entrada: 10/03/08 Postagens Recentes
Thanks Liferay.

I got patch from liferay and now its working properly.
Karen Smallwood, modificado 11 Anos atrás.

RE: Embed portlet in layout using Liferay 6.1.1

New Member Postagens: 4 Data de Entrada: 17/05/10 Postagens Recentes
I have the same issue. Can you share where you located the patch?
thumbnail
Jignesh Vachhani, modificado 11 Anos atrás.

RE: Embed portlet in layout using Liferay 6.1.1

Liferay Master Postagens: 803 Data de Entrada: 10/03/08 Postagens Recentes
you can find this patch from liferay if you are using EE version
thumbnail
Andew Jardine, modificado 10 Anos atrás.

RE: Embed portlet in layout using Liferay 6.1.1

Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
I just ran into the same issue this morning but I have found a work around (CE version, no patch). For me, I used the following line in my layout template and it worked --

$theme.runtime("[portletID], '', '')
thumbnail
James Falkner, modificado 9 Anos atrás.

RE: Embed portlet in layout using Liferay 6.1.1

Liferay Legend Postagens: 1399 Data de Entrada: 17/09/10 Postagens Recentes
Jignesh Vachhani:
1 - Stop Tomcat
2 - Copy the attached liferay-hotfix-110-6120.zip into $LIFERAY_HOME/patching-tool/patches folder
3 - Run 'patching-tool install' at $LIFERAY_HOME/patching-tool folder
4 - Run 'patching-tool info' to ensure that the patch has installed
5 - Start Tomcat


Hey Jignesh, please don't post EE hotfixes to our forums - as they are for enterprise subscription customers only. Thanks!
thumbnail
Jignesh Vachhani, modificado 9 Anos atrás.

RE: Embed portlet in layout using Liferay 6.1.1

Liferay Master Postagens: 803 Data de Entrada: 10/03/08 Postagens Recentes
Ohhh Thanks James for reminding me. Removed post