河马 CMS 7.9 方面

Hippo CMS 7.9 Facets

我正在尝试实施构面并创建一个目录组件。

我最初的方法是使用: org.onehippo.cms7.essentials.components.EssentialsContentComponent

但是它似乎不适用于 7.9。 我的下一个方法是扩展 PresentationList 组件,但是文档并不清楚如何为主要类别和子类别创建值。

我想将此代码用于我的组件我只是再次不确定将我的类别(值)放在哪里。

        try {
        HstRequestContext requestContext = request.getRequestContext();
        HippoBean scope = requestContext.getSiteContentBaseBean();
        PresentationPageableListInfo info = getComponentParametersInfo(request);
        LandingPage presentationPage = null;
        String resolvedContentPath = PathUtils.normalizePath(requestContext
                .getResolvedSiteMapItem().getRelativeContentPath());

        createAndExecuteSearch(request, info, scope, (BaseFilter) null,
                null, resolvedContentPath);

        if (scope instanceof HippoFolderBean) {
            presentationPage = getFirstLandingPageInFolder(request,
                    (HippoFolderBean) scope);
        }

        if (presentationPage != null) {
            request.setAttribute("document", presentationPage);
        }

        if (request.getPathInfo().toLowerCase().contains("facet/")) {
            request.setAttribute("faceted", true);
        }

    } catch (Exception e) {
        throw new HstComponentException("Failed to query presentations.", e);
    }

您是否尝试过这些网页: http://www.onehippo.org/7_9/library/concepts/faceted-navigation/faceted-navigation-configuration.html http://www.onehippo.org/7_9/library/setup/hst-components/facets-component.html