Commerce Reference Store includes the CBP custom tag library. These tags are implemented as .tag files, which are found in /WEB-INF/tags/store/.

Some of the custom tags are similar to gadgets in that they encapsulate reusable pieces of functionality. Other tags, known as container tags, make up a key aspect of the CRS page architecture. A container tag can insert standard elements in a page, and also encloses a <jsp:body> tag for rendering the main page content. For example, many pages use the <cpb:pageContainer> tag, which adds header, footer, and navigational elements to the page. This approach significantly reduces the number of JSP includes that are required.

The following example of using a container tag is adapted from /checkout/giftMessage.jsp, an optional page in the checkout process:

<cbp:checkoutContainer currentStage="giftMessage"
                       showProgressIndicator="true"
                       showOrderSummary="true"
                       hideShippingCharges="true">
  <jsp:body>
    <dsp:include page="gadgets/giftMessage.jsp" flush="true"/>
  </jsp:body>
</cbp:checkoutContainer>

In this example, the <cbp:checkoutContainer> tag is used to display a progress bar for the checkout process and include order summary information, while the enclosed <jsp:body> tag includes a gadget that renders a form for entering a gift message.

 
loading table of contents...