Foros de discusión
Custom portlet embedded in theme
Muhammed Shafeek V, modificado hace 10 años.
Custom portlet embedded in theme
Regular Member Mensajes: 140 Fecha de incorporación: 22/07/13 Mensajes recientes
Hi,
Someway we can able to embeded portlet into theme by using,
But its not looking good as we expecting, It shows title and and icons, How to remove these things? for removing I also tryed this,
It also not working ,. We are using liferay 6.2 and velosity theme. please help me
Someway we can able to embeded portlet into theme by using,
$theme.runtime("autocompleter_WAR_searchtestportlet", '', $velocityPortletPreferences.toString()).
But its not looking good as we expecting, It shows title and and icons, How to remove these things? for removing I also tryed this,
#set ($VOID = $velocityPortletPreferences.setValue('display-style', '1'))
#set ($VOID = $velocityPortletPreferences.setValue('portlet-setup-show-borders', 'false'))
$theme.runtime("autocompleter_WAR_searchtestportlet", '', $velocityPortletPreferences.toString())
#set ($VOID = $velocityPortletPreferences.reset())
It also not working ,. We are using liferay 6.2 and velosity theme. please help me
Tejas Kanani, modificado hace 10 años.
RE: Custom portlet embedded in theme
Liferay Master Mensajes: 654 Fecha de incorporación: 6/01/09 Mensajes recientes#set ($VOID = $velocityPortletPreferences.setValue('portlet-setup-show-borders', 'false'))
Try "portletSetupShowBorders" instead of 'portlet-setup-show-borders'.
Best Regards,
Tejas
Muhammed Shafeek V, modificado hace 10 años.
RE: Custom portlet embedded in theme
Regular Member Mensajes: 140 Fecha de incorporación: 22/07/13 Mensajes recientesTejas Kanani:
#set ($VOID = $velocityPortletPreferences.setValue('portlet-setup-show-borders', 'false'))
Try "portletSetupShowBorders" instead of 'portlet-setup-show-borders'.
#set ($VOID = $velocityPortletPreferences.setValue('display-style', '1'))
#set ($VOID = $velocityPortletPreferences.setValue('portletSetupShowBorders', 'false'))
$theme.runtime("autocompleter_WAR_searchtestportlet", '', $velocityPortletPreferences.toString())
#set ($VOID = $velocityPortletPreferences.reset())
this too, not working..
https://drive.google.com/file/d/0B1J9UWXesyC-a1c3b0k3LXZQbFE/edit?usp=sharing
Tejas Kanani, modificado hace 10 años.
RE: Custom portlet embedded in theme
Liferay Master Mensajes: 654 Fecha de incorporación: 6/01/09 Mensajes recientes
If you are trying to verify this on page where already a portlet is added, then this will not change it's preference.
This setting will work only when a page is embedding a portlet first time. Once the preference got set, refreshing it with modification in code will not be reflected as portlet's preference is already set.
So you might need to verify it with a new page.
This setting will work only when a page is embedding a portlet first time. Once the preference got set, refreshing it with modification in code will not be reflected as portlet's preference is already set.
So you might need to verify it with a new page.
Muhammed Shafeek V, modificado hace 10 años.
RE: Custom portlet embedded in theme (Respuesta)
Regular Member Mensajes: 140 Fecha de incorporación: 22/07/13 Mensajes recientes
Hi,
I solved that problem by using this code in my view.jsp
Thanks for your help and support.
I solved that problem by using this code in my view.jsp
String portletId = "autocompleter_WAR_searchtestportlet";
PortletPreferences portletSetup;
portletSetup = PortletPreferencesFactoryUtil.getLayoutPortletSetup(
layout, portletId);
portletSetup.setValue("portletSetupShowBorders",
String.valueOf(Boolean.FALSE));
portletSetup.store();
Thanks for your help and support.
srikanth velugoti, modificado hace 10 años.
RE: Custom portlet embedded in theme
Junior Member Mensajes: 79 Fecha de incorporación: 24/04/09 Mensajes recientes
Hi shafeek ,
have you tried to add the same property in liferay-look-and-feel.xml file in theme ?
the code looks some thing like below
<theme id="themeid" name="Theme Name">
<settings>
<setting key="portlet-setup-show-borders-default" value="false" />
</settings>
</theme>
otherwise you can use this property in portal-ext.properties file .
theme.portlet.decorate.default=false
HTH,
srikanth
have you tried to add the same property in liferay-look-and-feel.xml file in theme ?
the code looks some thing like below
<theme id="themeid" name="Theme Name">
<settings>
<setting key="portlet-setup-show-borders-default" value="false" />
</settings>
</theme>
otherwise you can use this property in portal-ext.properties file .
theme.portlet.decorate.default=false
HTH,
srikanth
Muhammed Shafeek V, modificado hace 10 años.
RE: Custom portlet embedded in theme
Regular Member Mensajes: 140 Fecha de incorporación: 22/07/13 Mensajes recientes
Thank you for your quick response srikanth.
Mazhar Alam, modificado hace 10 años.
RE: Custom portlet embedded in theme
Regular Member Mensajes: 191 Fecha de incorporación: 25/11/11 Mensajes recientes
Well you can update the border,title etc by updating the look and feel under the portlet settings.