掲示板

nestedPortlet embedded in portal_normal.vm

thumbnail
11年前 に Manuel Miklo によって更新されました。

nestedPortlet embedded in portal_normal.vm

New Member 投稿: 20 参加年月日: 10/01/30 最新の投稿
Hi togheter
i have a question about Liferay 6.1 - GA2.
I tried today to insert a nested portlet in the portal_normal.vm file with this code:

<div class="columns-header">
<div id="nested-portlet" role="main">
$velocityPortletPreferences.setValue("portletSetupShowBorders", "false")
$theme.runtime("118_INSTANCE_4mNaGhju9vqh", "", $velocityPortletPreferences.toString())
$velocityPortletPreferences.reset()
</div>
</div>

Now the portlet is rendered and shown, but i couldnt use the "drag and drop" function of this portlet. What could be the problem, that this is not working correect? Must be all portlets in a exactly container, for exapmle main-content that this works, or what could be the problem that i couldnt "select" the portlets for moving.

Greats and regards
Manuel

(The problem is visible here http://www.generationsofwisdom.com/home , maybe someone could say whats could be, why i couldnt move this portlets there )
thumbnail
11年前 に Manuel Miklo によって更新されました。

RE: nestedPortlet embedded in portal_normal.vm

New Member 投稿: 20 参加年月日: 10/01/30 最新の投稿
Hello
problem solved.
For the intereste people:

The problem is, that the drag-and-drop function of the Aui Framwork only take this portlets which are in the "#main-content" area. And if the portlet would be in the header-template its not inside this container. So no Javascript will not use this nested portelt as a "drag-zone".
Workaround could be to add a new container abouut all content, means abouth all nesteted portlets and the "#main-content" and after "hack" the bottom_js.jspf , where the Liferay.Layout JS-Var is defined the "container" to the new container. Problem would be if in other templates this container wouldnt exist, it wouldnt work because no container is found. So you must make a short if-statement, if the element would exist on the page.

Greats and Regard
Manuel