Skip to content

@rotty3000 /freemarker.ftl
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
setting look and feel settings on a non-instancable portlet embedded in the theme
<#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, "", "")}
#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, "", "")}
@pavelfomin

Thank you for the freemarker staticUtil example. It helped me to figure out how to get a reference to com.liferay.portal.service.ServiceContextThreadLocal to extract the http request parameters from the web content template: https://gist.github.com/pavelfomin/282dd597d4e88678866d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.