
Each product entry has two description fields, a long and
short description, which can be used to suit channel-specific needs.
With mobile browsers, a shorter product description might be preferred
to optimize the limited display area.
In this lesson, you
will modify the Madisons mobile starter store CachedProductDisplay.jsp
so that product short descriptions are retrieved when the product
display page is viewed using a mobile device.
Procedure
- Edit the CachedProductDisplay.jsp, which contains a parameter
that determines whether to retrieve the long or short description:
- Open WebSphere Commerce Developer.
- From the Enterprise Explorer view,
expand .
- Open CachedProductDisplay.jsp.
- Locate the following code snippet:
<p><c:out value="${product.description.longDescription}" escapeXml="false"/></p>
- Replace the snippet with the following code:
<p><c:out value="${product.description.shortDescription}" escapeXml="false"/></p>
- Save your changes and close the file.
- Verify the changes by launching a browser and viewing a
product page. The product's short description should be displayed.
You can confirm this by opening the corresponding product entry in
the Management Center.