how I can retrieve Group configration in freemarker

Jamie Sammons, modified 4 Years ago. New Member Posts: 7 Join Date: 7/14/21 Recent Posts

I have created a custom configuration in liferay setting , but I do not know how I can access these configurations from Freemarker. 

 

<#assign groupId1 = themeDisplay.getScopeGroupId()>
<#assign groupId =ParamUtil.getLong(renderRequest, "groupId", themeDisplay.getScopeGroupId())/>
<#assign companyId1 = themeDisplay.getSiteGroup().getCompanyId()>
<#assign portletDisplay = themeDisplay.getPortletDisplay()>

<#assign configurationProvider = serviceLocator.findService("com.liferay.portal.kernel.module.configuration.ConfigurationProvider")>
${configurationProvider.getGroupConfiguration("com.axiell.arena.liferay.modules.common_services.configuration.CommonServicesGroupConfiguration.Class , groupId1)}

 

anyone can help me ? 

thumbnail
Olaf Kock, modified 3 Years ago. Expert Posts: 308 Join Date: 2/13/13 Recent Posts

Have you properly scoped the configuration (for example, do you have a ConfigurationBeanDeclaration class?)?

Also, in a FreeMarker template I think oyu might just want to use the ConfigurationProviderUtil utility class, not the ConfigurationProvider.