When you add a new JSP file to a storefront, you must modify
other existing storefront pages to interact with the new file. The
interaction is accomplished by creating links from existing JSP files
to the new JSP file.
Before you begin
- Create and register your
new JSP file
- Determine on which pages you want to create links to your new
JSP file.
- Define any store text that you want to use in the store text properties
file.
Procedure
- Open WebSphere Commerce Developer
- In the Enterprise Explorer view,
expand
- Continue to navigate to the subdirectory that contains
the JSP file you want to modify.
- Add code similar to the following example to create a URL
link. In this example, the link connects to a registered view called
RecipeSection.
<c:url var="RecipeSectionURL" value="RecipeSection">
<c:param name="langId" value="${langId}" />
<c:param name="storeId" value="${WCParam.storeId}" />
<c:param name="catalogId" value="${WCParam.catalogId}" />
<c:param name="categoryId" value="${topCategory.categoryId}" />
<c:param name="isRecipeSection" value="true" />
</c:url>
<a href="<c:out value="${RecipeSectionURL}" />" class="m_link"
id="WC_CachedHeaderDisplay_Link_10"><fmt:message key="ProjectsType"
bundle="${storeText}" /></a>
In the preceding example, five parameters are supplied
to the new page. The
isRecipeSection
is an example
of a custom parameter that can be used on the
RecipeSection page.
- Test your customization by navigating through the links
that you created.