Updating the store JSP file to set the URL navigation suggestion
In this lesson,
you are updating your store JSP file to set the URL for your warranty
type suggestion group for the auto-suggest menu
Procedure
- In the Enterprise Explorer view, navigate to Stores > WebContent > Madisons > Snippets > Search.
- Open SearchSetup.jspf for editing.
- Find the
<c:choose>
block that contains the block of code checking forsearchTermScope
:<c:choose> <c:when test = "${WCParam.searchTermScope == 3}"> <c:set var = "navigationView" value = "getCatalogNavigationAttachmentView" scope = "request"/> <c:set var = "searchProfile" value = "IBM_findCatalogEntryByUnstructureField" scope = "request"/> </c:when> <c:when test = "${WCParam.searchTermScope == 2}"> <c:set var = "navigationView" value = "getCatalogNavigationView" scope = "request"/> <c:set var = "searchProfile" value = "IBM_findCatalogEntryByName" scope = "request"/> </c:when> <c:otherwise> <c:set var = "navigationView" value = "getCatalogNavigationView" scope = "request"/> <c:set var = "searchProfile" value = "IBM_findCatalogEntryByNameAndShortDescription" scope = "request"/> </c:otherwise> </c:choose>
- Insert
searchTermScope
handling to use the warranty term search profile added in a previous lesson.<c:when test="${WCParam.searchTermScope == 100}"> <c:set var="navigationView" value="getCatalogNavigationView" scope="request"/> <c:set var="searchProfile" value="x_findCatalogEntryByWarranty" scope="request"/> </c:when>
For example:
<c:choose> <c:when test = "${WCParam.searchTermScope == 100}"> <c:set var = "navigationView" value = "getCatalogNavigationView" scope = "request"/> <c:set var = "searchProfile" value = "x_findCatalogEntryByWarranty" scope = "request"/> </c:when> <c:when test = "${WCParam.searchTermScope == 3}"> <c:set var = "navigationView" value = "getCatalogNavigationAttachmentView" scope = "request"/> <c:set var = "searchProfile" value = "IBM_findCatalogEntryByUnstructureField" scope = "request"/> </c:when> <c:when test = "${WCParam.searchTermScope == 2}"> <c:set var = "navigationView" value = "getCatalogNavigationView" scope = "request"/> <c:set var = "searchProfile" value = "IBM_findCatalogEntryByName" scope = "request"/> </c:when> <c:otherwise> <c:set var = "navigationView" value = "getCatalogNavigationView" scope = "request"/> <c:set var = "searchProfile" value = "IBM_findCatalogEntryByNameAndShortDescription" scope = "request"/> </c:otherwise> </c:choose>
- Save and close the file.
- Restart the server.