Fórum

Portlet Drag Drop not working

Amritashan S. Lal, modificado 17 Anos atrás.

Portlet Drag Drop not working

New Member Postagens: 10 Data de Entrada: 22/12/06 Postagens Recentes
Hi all,
I have created a new theme by modifying the Velocity theme at several places.
Now the problem is that I am not able to drag-drop the portlets. The cursor does not change to the draggable one. And attempting to drag the portlet simply selects the title of the portlet.
How do i make the porlet draggable? What did i miss?

Thanks in advance.
thumbnail
Jevon Wright, modificado 12 Anos atrás.

RE: Portlet Drag Drop not working

New Member Postagens: 8 Data de Entrada: 06/12/11 Postagens Recentes
The default layout structure on http://www.liferay.com/community/wiki/-/wiki/Main/Layout+Template will not permit drag/drop of portlets. To enable drag/drop on custom layouts, you must have a <div id="main-content" role="main"> surrounding the layout itself.

See: http://www.liferay.com/community/forums/-/message_boards/message/7658822/maximiz­ed
thumbnail
Mazhar Alam, modificado 12 Anos atrás.

RE: Portlet Drag Drop not working

Regular Member Postagens: 191 Data de Entrada: 25/11/11 Postagens Recentes
Hi,
I am also facing the same problems with the layout,some of the portlets are not allowed to drag/drop in the page layout which i selected..instead the portlets are aligned in the same line one after other..

<div id="main-content" role="main"> this tag is already present in the layout.tpl

Any solutions..

Thanks in advance..
thumbnail
Olaf Kock, modificado 12 Anos atrás.

RE: Portlet Drag Drop not working

Liferay Legend Postagens: 6396 Data de Entrada: 23/09/08 Postagens Recentes
IMHO Drag&Drop is dependent on some (I don't know exactly which) css classes. As you just say that you "changed your templates" I guess that you might have removed the important classes. Compare your templates with the original ones and try to mimic what you see there.

Also - just to be sure - make sure that you don't have staging activated and are trying to drag/drop in production (this won't work by design)
thumbnail
Kushal Jayswal, modificado 10 Anos atrás.

RE: Portlet Drag Drop not working

New Member Postagens: 18 Data de Entrada: 19/11/12 Postagens Recentes
The main trigger for drag-n-drop functionality is "main-content" ID. You must mentioned that ID to make it work. It would be there whenever you try to create new layout from some IDE.

<div class="some_class" id="[b]main-content[/b]" role="main">
	<div class="portlet-layout main-content">
		<div class="wrap">
			<div class="aui-w70 portlet-column portlet-column-first" id="column-1">
				$processor.processColumn("column-1", "portlet-column-content portlet-column-content-first")
			</div>
			<div class="aui-w30 portlet-column portlet-column-last" id="column-2">
				$processor.processColumn("column-2", "portlet-column-content portlet-column-content-last")
			</div>
		</div>
	</div>
</div>