Created
October 12, 2011 14:12
-
-
Save rotty3000/1281325 to your computer and use it in GitHub Desktop.
setting look and feel settings on a non-instancable portlet embedded in the theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#assign locPortletId = "82" /> | |
<#assign PortletPreferencesFactoryUtil = staticUtil["com.liferay.portlet.PortletPreferencesFactoryUtil"] /> | |
<#assign portletSetup = PortletPreferencesFactoryUtil.getLayoutPortletSetup(layout, locPortletId) /> | |
<#if portletSetup.getValue("portletSetupShowBorders", "") != "false" > | |
<#assign temp = portletSetup.setValue("portletSetupShowBorders", "false") /> | |
<#assign temp = portletSetup.store() /> | |
</#if> | |
${theme.runtime(locPortletId, "", "")} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#set ($locPortletId = "82") | |
#set ($PortletPreferencesFactoryUtil = $portal.getClass().forName("com.liferay.portlet.PortletPreferencesFactoryUtil")) | |
#set ($portletSetup = $PortletPreferencesFactoryUtil.getLayoutPortletSetup($layout, $locPortletId)) | |
#if ($portletSetup.getValue("portletSetupShowBorders", "") != "false") | |
#set ($temp = $portletSetup.setValue("portletSetupShowBorders", "false")) | |
#set ($temp = $portletSetup.store()) | |
#end | |
${theme.runtime($locPortletId, "", "")} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Raymond,
How best can i customize a web form portlet embedded inside my theme. Below has my web form code and hooks haven't been of help in customising this portlet.
Kindly, suggest a fix.
Cheers
set ($locPortletId = "1_WAR_webformportlet_INSTANCE_" + $group_id)
set ($portletPreferencesFactoryUtil = $portal.getClass().forName("com.liferay.portlet.PortletPreferencesFactoryUtil"))
set ($portletSetup = $portletPreferencesFactoryUtil.getLayoutPortletSetup($layout, $locPortletId))
$theme.runtime("$locPortletId", "", $velocityPortletPreferences.toString())
$velocityPortletPreferences.reset()