liferay-7liferay-theme

Liferay DXP theme freeMarkerPortletPreferences showCurrentGroup boolean


I want to change the portlet preference on the breadcrumb portlet embeded into our theme. The breadcrumb portlet is showing the current site. The portlet preference to remove this appears to be showCurrentGroup.

The original freemarker to add the breadcrumb looks like this:

    <#assign VOID = freeMarkerPortletPreferences.setValue("portletSetupPortletDecoratorId", "barebone") />              
    <@liferay.breadcrumbs default_preferences=freeMarkerPortletPreferences?string />
    <#assign VOID = freeMarkerPortletPreferences.reset()/>

I've changed it like this, but it doesn't appear to work.

    <#assign VOID = freeMarkerPortletPreferences.setValue("portletSetupPortletDecoratorId", "barebone") />
    <#assign VOID = freeMarkerPortletPreferences.setValue("showCurrentGroup", "false") />
    <@liferay.breadcrumbs default_preferences=freeMarkerPortletPreferences?string />
    <#assign VOID = freeMarkerPortletPreferences.reset()/>

Any help will be much appreciated.


Solution

  • Setting a custom instance Id did the trick for me:

    <@liferay_portlet["runtime"]
      defaultPreferences="${freeMarkerPortletPreferences}"
      portletProviderAction=portletProviderAction.VIEW
      portletProviderClassName="com.liferay.portal.kernel.servlet.taglib.ui.BreadcrumbEntry"
      instanceId="embedded_breadcrumb"
    />