Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save firaja/4635738b7703282e8d0cb68a146baee7 to your computer and use it in GitHub Desktop.
Save firaja/4635738b7703282e8d0cb68a146baee7 to your computer and use it in GitHub Desktop.
Hybris - solve homepage set to false in cmscockpit
public class CustomCmsContentPagePrepareInterceptor extends CmsContentPagePrepareInterceptor
{
@Override
protected void resetHomepageFlag(Collection<AbstractPageModel> contentPages, ContentPageModel currentPageModel, InterceptorContext ctx)
{
if (this.getCmsAdminPageService().getActiveCatalogVersion().equals(currentPageModel.getCatalogVersion()))
{
super.resetHomepageFlag(contentPages, currentPageModel, ctx);
}
}
}
<bean id="contentPagePrepareInterceptor" class="your.package.CustomCmsContentPagePrepareInterceptor">
<property name="cmsAdminPageService" ref="cmsAdminPageService"/>
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment