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:
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 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:
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 thename
attributes.Check, that the Struts configuration is already referenced from the
init-param
with name "config" in your IBM WCSweb.xml
file. Otherwise, copy the configuration from theworkspace/Stores/WebContent/WEB-INF/web.xml
file.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 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 IBM workspace.
Check SEO links
As defined in
SEOURLPatterns-CoreMedia.xml
the URL patternCoreMediaContentURL
andCoreMediaMicroSiteURL
can be used from within the IBMwcf:url
tag. You can find the implementation of URL generation for CoreMedia content with this tag in the JSP fileWCDE-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.