close

Filter

loading table of contents...

Connector for HCL Commerce Manual / Version 2201

Table Of Contents

3.11 Setting up SEO URLs for CoreMedia Pages

HCL Commerce contains a default SEO-URL configuration for its shopping pages, such as product detail pages or category landing page. For a seamless integration of CoreMedia content pages like CoreMedia article pages the SEO-URL configuration needs to be extended. The HCL Commerce Workspace archive comes with a SEO-URL configuration, which you can apply to your project HCL Commerce workspace.

The CoreMedia SEO-URL configuration is required for the usage of CoreMedia Content Display in your HCL Commerce environment.

As a prerequisite, SEO URLs require the custom access control policies, installed in Section 3.10, “Deploying the CoreMedia Widgets”.

In order to enable the CoreMedia SEO URLs do the following steps:

  1. Define the SEO pattern and its mapping for a given StoreName (Aurora or AuroraEsite, for instance). See the HCL documentation at https://help.hcltechsw.com/commerce/9.0.0/seositemap/concepts/csdSEOpatternfiles.html for more details about SEO configuration.

    To do so, copy the SEO pattern file workspace/crs-web/WebContent/WEB-INF/xml/seo/stores/{StoreName}/SEOURLPatterns-CoreMedia.xml to your project workspace.

    Note

    Note

    For development, create a file .reload (text file) in the same directory and add this line: reloadinterval = 30. This will reload the SEO patterns file every 30 seconds.

  2. Configure the handling of SEO Requests as follows:

    Extend the existing Spring MVC views.xml within the custom stores web archive. The location of the file is crs-web/WEB-INF/spring/views.xml

    <import resource="classpath:/WEB-INF/spring/widgets-views-ext.xml"/>

    Example 3.4. Import the customized widgets views


  3. Check if the copied JSP files already contain the parameter externalSeoSegment:

    The SEO pattern specifies that the path segment after /cm/ will be mapped to a JSP parameter externalSeoSegment. Make sure the parameter is actually recognized and prepared to be passed to the lc-include tag as lc_externalRef parameter.

    <c:if test="${not empty param.externalSeoSegment}">
              <c:set var="lc_externalRef" value="cm-seosegment:${param.externalSeoSegment}"/>
            </c:if>

    Otherwise, check the JSP files in the CoreMedia archive file and copy the settings to the JSPs in the HCL workspace.

  4. Check SEO links

    As defined in SEOURLPatterns-CoreMedia.xml, the URL pattern CoreMediaContentURL can be used from within the HCL wcf:url tag. You can find the implementation of URL generation for CoreMedia content with this tag in the JSP file WCDE-ZIP/workspace/crs-web/WebContent/Widgets-CoreMedia/com.coremedia.commerce.store.widgets.CoreMediaContentWidget/impl/templates/Content.url.jsp. Check that this file is already included in your HCL workspace. Otherwise, copy it.

Note

Note

In oder to adapt the predefined URL prefix "/cm" for SEO URLs for CoreMedia Content Pages to your needs, you need to customize

  • the HCL Commerce SEO URL pattern for CoreMedia Content Pages

  • the property wcs.link.cm-path-identifier in your Commerce Adapter deployment

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.