Connector for HCL Commerce Manual / Version 2010
Table Of ContentsHCL 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 4.10, “Deploying the CoreMedia Widgets”.
In order to enable the CoreMedia SEO URLs do the following steps:
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
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.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 iscrs-web/WEB-INF/spring/views.xml
<import resource="classpath:/WEB-INF/spring/widgets-views-ext.xml"/>
Example 4.4. Import the customized widgets views
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 parameterexternalSeoSegment
. Make sure the parameter is actually recognized and prepared to be passed to the lc-include tag aslc_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.
Check SEO links
As defined in
SEOURLPatterns-CoreMedia.xml
, the URL patternCoreMediaContentURL
can be used from within the HCLwcf:url
tag. You can find the implementation of URL generation for CoreMedia content with this tag in the JSP fileWCDE-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
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