フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Manuel Miklo
nestedPortlet embedded in portal_normal.vm
2013/02/14 6:49
答え

Manuel Miklo

ランク: New Member

投稿: 12

参加年月日: 2010/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 )
Manuel Miklo
RE: nestedPortlet embedded in portal_normal.vm
2013/02/14 15:50
答え

Manuel Miklo

ランク: New Member

投稿: 12

参加年月日: 2010/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