Foren

Unable to embed portlet without border

Juraj Lonc, geändert vor 12 Jahren.

Unable to embed portlet without border

New Member Beiträge: 9 Beitrittsdatum: 03.12.11 Neueste Beiträge
I need to embed portlet directly to theme. Portlet is shown, but with borders. And I am not able to manage it to show it without borders.

I tryed both instanceable and non-instaceable portlet (liferay-portlet.xml).
<instanceable>true</instanceable>


I tryed to set portlet preferences (portlet.xml)
<portlet-preferences>
    		<preference>
        		<name>portlet-setup-show-borders</name>
        		<value>false</value>
    		</preference>
</portlet-preferences>


portal_normal.vm contains:
$velocityPortletPreferences.setValue("portlet-setup-show-borders", "false")
#set ($portletId = 'authorityswitcher_WAR_webclient11SNAPSHOT')
#set ($instanceId = 'abcd')
#set ($myPortletId = "${portletId}_INSTANCE_${instanceId}")

$taglibLiferay.runtime($myPortletId, "", $velocityPortletPreferences.toString())


The only way I figured out was to turn borders off manually. That is not good solution.
What am I doing wrong?
thumbnail
amit doshi, geändert vor 11 Jahren.

RE: Unable to embed portlet without border

Liferay Master Beiträge: 550 Beitrittsdatum: 29.12.10 Neueste Beiträge
can you please let me know which liferay version you are using?
Juraj Lonc, geändert vor 11 Jahren.

RE: Unable to embed portlet without border

New Member Beiträge: 9 Beitrittsdatum: 03.12.11 Neueste Beiträge
liferay-portal-6.1.0-ce-ga1
with tomcat-7.0.23
thumbnail
amit doshi, geändert vor 11 Jahren.

RE: Unable to embed portlet without border

Liferay Master Beiträge: 550 Beitrittsdatum: 29.12.10 Neueste Beiträge
It was changed in liferay-portal-6.1.0-ce-ga1

Use below one it will work

<preference>
				<name>portletSetupShowBorders</name>
				<value>false</value>
			</preference>


and for velocity try below one


$velocityPortletPreferences.setValue("portletSetupShowBorders", "false")


Let me know if any issue .

And also if it works for you then plz mark my answer correct. So, it helps others.

Thanks & Regards,
Amit Dosh
royou dou, geändert vor 11 Jahren.

RE: Unable to embed portlet without border

New Member Beitrag: 1 Beitrittsdatum: 18.11.11 Neueste Beiträge
Hi Amin,
this parameter doesn't work
<preference>
				<name>portletSetupShowBorders</name>
				<value>false</value>
			</preference>

neither

$velocityPortletPreferences.setValue("portletSetupShowBorders", "false")


I also work with
liferay-portal-6.1.0-ce-ga1
with tomcat-7.0.23
thumbnail
Amit Doshi, geändert vor 11 Jahren.

RE: Unable to embed portlet without border

Liferay Master Beiträge: 550 Beitrittsdatum: 29.12.10 Neueste Beiträge
Just remove the portlet from the page and once again drag and drop it will work.

I am also working with the same version. It is working fine for me.
Juraj Lonc, geändert vor 11 Jahren.

RE: Unable to embed portlet without border

New Member Beiträge: 9 Beitrittsdatum: 03.12.11 Neueste Beiträge
Amit Doshi, we are talking about portlet embedded into theme. So it is NOT possible to remove or drag&drop back again...
thumbnail
Amit Doshi, geändert vor 11 Jahren.

RE: Unable to embed portlet without border

Liferay Master Beiträge: 550 Beitrittsdatum: 29.12.10 Neueste Beiträge
Check it whether without embedding in theme. The following code works for that particular portlet.

As you have already put the below code for that portlet.

<portlet-preferences>
            <preference>
               <name>portletSetupShowBorders</name>
                <value>false</value>
            </preference>
</portlet-preferences>


Then the portlet should be shown in that particular page without border wherever you drop it.

Regards,
Amit Doshi
Juraj Lonc, geändert vor 11 Jahren.

RE: Unable to embed portlet without border

New Member Beiträge: 9 Beitrittsdatum: 03.12.11 Neueste Beiträge
Amit Doshi:
Check it whether without embedding in theme. The following code works for that particular portlet.

As you have already put the below code for that portlet.

<portlet-preferences>
            <preference>
               <name>portletSetupShowBorders</name>
                <value>false</value>
            </preference>
</portlet-preferences>


Then the portlet should be shown in that particular page without border wherever you drop it.

Regards,
Amit Doshi



Actually I have used this workaround.
Unfortunately it has one very negative side. If you add such portlet to standard page (by mistake) that you are in trouble, because there is no way how to remove this portlet. You will have to remove whole page a create new one.
Oliver Bayer, geändert vor 11 Jahren.

RE: Unable to embed portlet without border

Liferay Master Beiträge: 894 Beitrittsdatum: 18.02.09 Neueste Beiträge
Hi Juraj,

this can be solved by deleting the corresponding entry in the liferay db in the table "portletpreferences". If your portal was running while deleting the entry you should go to the control panel -> server administration -> "delete db cache" or restart the portal.

HTH Oli
thumbnail
Amit Doshi, geändert vor 11 Jahren.

RE: Unable to embed portlet without border

Liferay Master Beiträge: 550 Beitrittsdatum: 29.12.10 Neueste Beiträge
Hi All,

sorry to come late on post.

Actually the syntax that I posted before is correct but there is some bug in Liferay 6.1

We need to refresh with Ctrl +R to see the changes into effect.

Please also refer below post

http://www.liferay.com/community/forums/-/message_boards/message/12865547

Hope it helps.

Thanks & Regards,
Amit Doshi
thumbnail
Amit Doshi, geändert vor 11 Jahren.

RE: Unable to embed portlet without border

Liferay Master Beiträge: 550 Beitrittsdatum: 29.12.10 Neueste Beiträge
Hello Guys,

Here i find the issue for the same in Liferay.

http://issues.liferay.com/browse/LPS-27160
Ravali Rachuri, geändert vor 11 Jahren.

RE: Unable to embed portlet without border

New Member Beitrag: 1 Beitrittsdatum: 14.05.12 Neueste Beiträge
Hi ,

When I made the portlet as instanceable and copied that instance id while embedding the portlet,
and after that when i used $velocityPortletPreferences.setValue("portletSetupShowBorders", "false")
it's working fine.

Regards,
Ravali.
thumbnail
Toni Pérez Rodil, geändert vor 11 Jahren.

RE: Unable to embed portlet without border

New Member Beiträge: 9 Beitrittsdatum: 02.08.10 Neueste Beiträge
Juraj Lonc:

portal_normal.vm contains:
$velocityPortletPreferences.setValue("portlet-setup-show-borders", "false")
#set ($portletId = 'authorityswitcher_WAR_webclient11SNAPSHOT')
#set ($instanceId = 'abcd')
#set ($myPortletId = "${portletId}_INSTANCE_${instanceId}")

$taglibLiferay.runtime($myPortletId, "", $velocityPortletPreferences.toString())



Hello.

Try changing the "instanceId" to another value.
I noted that after showing a page with a portlet embedded in the theme, I can't modify its preferences.

I hope that helps.
Regards.
--
Toni Pérez Rodil
B2B 2000
Juraj Lonc, geändert vor 11 Jahren.

RE: Unable to embed portlet without border

New Member Beiträge: 9 Beitrittsdatum: 03.12.11 Neueste Beiträge
Toni Pérez Rodil:

Try changing the "instanceId" to another value.
I noted that after showing a page with a portlet embedded in the theme, I can't modify its preferences.

I hope that helps.
Regards.
--
Toni Pérez Rodil
B2B 2000


I tryed. No effect.
thumbnail
delang j, geändert vor 11 Jahren.

RE: Unable to embed portlet without border

Expert Beiträge: 252 Beitrittsdatum: 14.07.08 Neueste Beiträge
hi juraj,

staring from 6.1 there is bit diff from prev version in embed portlet. here what i had done for web content portlet & it working fine emoticon

$velocityPortletPreferences.setValue("portletSetupShowBorders", "false")
$velocityPortletPreferences.setValue("groupId", "10180")
$velocityPortletPreferences.setValue("articleId", "28181")
$theme.runtime("56_INSTANCE_4mNaGhju9vqh", "", $velocityPortletPreferences.toString())
$velocityPortletPreferences.reset()


u can notice that instance id is 12 character.