loading table of contents...

3.4.12. Setting up SEO URLs for CoreMedia Pages

IBM WCS 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 or microsites the SEO-URL configuration needs to be extended. The CoreMedia LiveContext 2.0 WebSphere Commerce Project Workspace archive comes with a SEO-URL configuration, which you can apply to your project WCS workspace.

The CoreMedia SEO-URL configuration is required for the usage of CoreMedia Microsites and CoreMedia Content Display in your WCS environment.

As a prerequisite, SEO URLs require the custom access control policies, installed in Section 3.4.11, “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 IBM documentation at https://www.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.seositemap.doc/concepts/csdSEOpatternfiles.htm for more details about SEO configuration.

    To do so, copy the SEO pattern file workspace/Stores/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:

    Apply the Struts configuration from workspace/Stores/WebContent/WEB-INF/struts-config-lc2.xml from the CoreMedia archive to your project workspace. Do not forget to change storeIDs to your needs. The storeID is the number at the end of the values of the name attributes.

    Check, that the Struts configuration is already referenced from the init-param with name "config" in your IBM WCS web.xml file. Otherwise, copy the configuration from the workspace/Stores/WebContent/WEB-INF/web.xml file.

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

    The SEO pattern specifies that the path segment after /cm/ or /microsite/ 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 IBM workspace.

  4. Check SEO links

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