Customizing the Category Page
This document describes how to create a customized Category page.
Pages, Tags, and Templates
Variables
| Variable Name | Description | Value |
|---|---|---|
|
<${addOnName}> |
The name of the AddOn |
b2ctelcostorefront |
|
<${addOnPageRoot}> |
The location where custom page fragments must go |
b2ctelcostorefront/acceleratoraddon/web/webroot/WEB-INF |
|
<${addOnStoreExt}> |
The name of the addon's store extension |
b2ctelcostore |
|
<${customCategoryJSP}> |
Custom category file name |
servicePlanCategoryOverviewPage |
Replace Category Page with a Customized Page
File Name: <${addOnStoreExt}>/resources/b2ctelcostore/import/coredata/contentCatalogs/b2ctelcoContentCatalog/cms-content.impex
INSERT_UPDATE PageTemplate;$contentCV[unique=true];uid[unique=true];name;frontendTemplateName;restrictedPageTypes(code);active[default=true]
;;CategoryPageTemplate;Category Page Template;addon:${addOnName}/pages/telco/category/${customCategoryJSP};CategoryPage
Customized the category page as shown in the example from the servicePlanCategoryOverviewPage.jsp file:
<%@ page trimDirectiveWhitespaces="true" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="template" tagdir="/WEB-INF/tags/desktop/template" %>
<%@ taglib prefix="nav" tagdir="/WEB-INF/tags/desktop/nav" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="cms" uri="/WEB-INF/common/tld/cmstags.tld" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="ycommerce" uri="/WEB-INF/common/tld/ycommercetags.tld" %>
<%@ taglib prefix="common" tagdir="/WEB-INF/tags/desktop/common" %>
<%@ taglib prefix="breadcrumb" tagdir="/WEB-INF/tags/desktop/nav/breadcrumb" %>
<template:page pageTitle="${pageTitle}">
<div id="globalMessages">
<common:globalMessages/>
</div>
<div class="span-20">
<div id="productDetailUpdateable">
<div class="span-24 plans-overview">
<cms:pageSlot var="banner" position="Section2">
<cms:component component="${banner}"/>
</cms:pageSlot>
</div>
</div>
</div>
</template:page>
Add the Preview Page with a Preview Image to the CMS Cockpit
File Name: <${addOnStoreExt}>/resources/b2ctelcostore/import/sampledata/contentCatalogs/b2ctelcoContentCatalog/cms-content.impex
INSERT_UPDATE Media;$contentCV[unique=true];code[unique=true];mime;realfilename;@media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator][forceWrite=true];folder(qualifier)[default='images'] ;;productDetailsForAddOnsPagePreview;text/png;ProductDetailsForAddOnsPage.png;$jarResourceCms/preview-images/b2ctelco/ProductDetailsForAddOnsPage.png