Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Manuel Miklo
nestedPortlet embedded in portal_normal.vm
14 febbraio 2013 6.49
Risposta

Manuel Miklo

Punteggio: New Member

Messaggi: 14

Data di Iscrizione: 30 gennaio 2010

Messaggi recenti

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
14 febbraio 2013 15.50
Risposta

Manuel Miklo

Punteggio: New Member

Messaggi: 14

Data di Iscrizione: 30 gennaio 2010

Messaggi recenti

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