Commerce Reference Store is configured to render on each category page and product detail page a link tag that specifies the canonical URL for the page. When spiders for certain Web search engines crawl a page, they record the page’s URL as the value specified in the tag, rather than the actual URL that was used to access the page.

For example, the link tag for a product detail page might be:

<link rel="canonical" ref="http://www.example.com:80/crs/storeus/jump/
Dotted+Repp+Tie/productDetail/For+Him/xprod1001/cat50067 " />

On both ATG-driven product detail pages and Endeca-driven category pages, the link tags are generated by the store.war/global/gadgets/documentLinks.jsp gadget, which is included by the store.war/includes/pageStart.jsp file (which is included by the <dsp:pageContainer> tag).

The documentLinks.jsp gadget uses the BrowserTyperDroplet servlet bean to determine the browser type on the request. If the browser type is robot, documentLinks.jsp gadget invokes /atg/store/droplet/DocumentLinksDroplet, which is a servlet bean of class atg.projects.store.droplet.EndecaDocumentLinksDroplet. This class is a CRS-specific descendant of the ItemLinkDroplet class described in the URLs for ATG-Driven Pages section. The DocumentLinksDroplet component is used to generate the link tags for both ATG-driven and Endeca-driven pages.

The documentLinks.jsp gadget invokes DocumentLinksDroplet with several input parameters:

<dsp:droplet name="DocumentLinksDroplet"
currentCategory="${currentCategory}"
currentProduct="${currentProduct}"
currentSiteId="${siteId}"
canonicalLink="${canonicalLink}"
var="linkDetails">

If the page is Endeca-driven, currentCategory and currentProduct are null. The value of canonicalLink is extracted from the root content item. DocumentLinksDroplet uses this value to create the link tag.

If the page is ATG-driven, canonicalLink is null, and currentProduct and currentCategory are the repository IDs of the current product and category. In this case, DocumentLinksDroplet uses the URL recoding feature described in URL Recoding to render the URL in the link tag. The link URL is generated by an indirect URL template, which is specified by the itemDescriptorNameToUrlTemplateMap property of DocumentLinksDroplet:

itemDescriptorNameToUrlTemplateMap=\
        product=/atg/repository/seo/ProductIndirectTemplate

Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices