Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Jignesh Vachhani
Embed portlet in layout using Liferay 6.1.1
30. November 2012 00:23
Antwort

Jignesh Vachhani

Rang: Liferay Master

Nachrichten: 783

Eintrittsdatum: 10. März 2008

Neue Beiträge

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 ?
Jignesh Vachhani
RE: Embed portlet in layout using Liferay 6.1.1 EE GA2
30. November 2012 03:02
Antwort

Jignesh Vachhani

Rang: Liferay Master

Nachrichten: 783

Eintrittsdatum: 10. März 2008

Neue Beiträge

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)
 1
 2public String processPortlet(String portletId) throws Exception {
 3        try {
 4            _request.setAttribute(
 5                WebKeys.RENDER_PORTLET_RESOURCE, Boolean.TRUE);
 6
 7            return RuntimePortletUtil.processPortlet(
 8                _servletContext, _request, _response, null, null, [b]_portletId[/b],
 9                null, false);
10        }
11        finally {
12            _request.removeAttribute(WebKeys.RENDER_PORTLET_RESOURCE);
13        }
14    }


2) When i am using $theme.runtime
Its rendering the code outside of layout and trying to find out the solution
Jignesh Vachhani
RE: Embed portlet in layout using Liferay 6.1.1
5. Dezember 2012 22:51
Antwort

Jignesh Vachhani

Rang: Liferay Master

Nachrichten: 783

Eintrittsdatum: 10. März 2008

Neue Beiträge

Thanks Liferay.

I got patch from liferay and now its working properly.
Karen Smallwood
RE: Embed portlet in layout using Liferay 6.1.1
11. Februar 2013 20:38
Antwort

Karen Smallwood

Rang: New Member

Nachrichten: 3

Eintrittsdatum: 17. Mai 2010

Neue Beiträge

I have the same issue. Can you share where you located the patch?
Jignesh Vachhani
RE: Embed portlet in layout using Liferay 6.1.1
26. Februar 2013 23:17
Antwort

Jignesh Vachhani

Rang: Liferay Master

Nachrichten: 783

Eintrittsdatum: 10. März 2008

Neue Beiträge

you can find this patch from liferay if you are using EE version
Andew Jardine
RE: Embed portlet in layout using Liferay 6.1.1
31. Oktober 2013 10:48
Antwort

Andew Jardine

Community Moderator

Rang: Liferay Master

Nachrichten: 589

Eintrittsdatum: 22. Dezember 2010

Neue Beiträge

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(", '', '')
James Falkner
RE: Embed portlet in layout using Liferay 6.1.1
14. April 2014 07:29
Antwort

James Falkner

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 1368

Eintrittsdatum: 17. September 2010

Neue Beiträge

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!
Jignesh Vachhani
RE: Embed portlet in layout using Liferay 6.1.1
14. April 2014 07:51
Antwort

Jignesh Vachhani

Rang: Liferay Master

Nachrichten: 783

Eintrittsdatum: 10. März 2008

Neue Beiträge

Ohhh Thanks James for reminding me. Removed post