掲示板

Custom portlet embedded in theme

thumbnail
10年前 に Muhammed Shafeek V によって更新されました。

Custom portlet embedded in theme

Regular Member 投稿: 140 参加年月日: 13/07/22 最新の投稿
Hi,
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
thumbnail
10年前 に Tejas Kanani によって更新されました。

RE: Custom portlet embedded in theme

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
#set ($VOID = $velocityPortletPreferences.setValue('portlet-setup-show-borders', 'false'))

Try "portletSetupShowBorders" instead of 'portlet-setup-show-borders'.

Best Regards,
Tejas
thumbnail
10年前 に Muhammed Shafeek V によって更新されました。

RE: Custom portlet embedded in theme

Regular Member 投稿: 140 参加年月日: 13/07/22 最新の投稿
Tejas 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
thumbnail
10年前 に Tejas Kanani によって更新されました。

RE: Custom portlet embedded in theme

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
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.
thumbnail
10年前 に Muhammed Shafeek V によって更新されました。

RE: Custom portlet embedded in theme (回答)

Regular Member 投稿: 140 参加年月日: 13/07/22 最新の投稿
Hi,

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.
thumbnail
10年前 に srikanth velugoti によって更新されました。

RE: Custom portlet embedded in theme

Junior Member 投稿: 79 参加年月日: 09/04/24 最新の投稿
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
thumbnail
10年前 に Muhammed Shafeek V によって更新されました。

RE: Custom portlet embedded in theme

Regular Member 投稿: 140 参加年月日: 13/07/22 最新の投稿
Thank you for your quick response srikanth.
thumbnail
10年前 に Mazhar Alam によって更新されました。

RE: Custom portlet embedded in theme

Regular Member 投稿: 191 参加年月日: 11/11/25 最新の投稿
Well you can update the border,title etc by updating the look and feel under the portlet settings.