To change the Catalog Media browse node icon, do the following:
Provide the icon attribute value to the image for
id="media"
inContentBrowseHierarchy.xml
, and remove the existingicon-resource
attribute.The following is sample code for providing the custom icon for browse mode:
<!-- The media node --> <browse-item id="media" label-resource="node.media.label" is-root="true" icon="images/stat_error_16.png"> <list-definition id="mediaRootFolders" retriever="query" child-type="/atg/commerce/catalog/MerchandisingProductCatalog:folder"> <retriever-parameter name="query" value="parentFolder IS NULL" /> <retriever-parameter name="refresh-property" value="parentFolder" /> </list-definition> </browse-item> <!-- end media -->
To implement custom icons for the Catalog Asset type, do the following:
Find the icon attributes from
customCatalog.xml
foritem-descriptor
withname="catalog"
.The attributes are
flexIconResource
andlargeFlexIconResource
. Their corresponding values arecatalogIconSwf
andcatalogLargeIconSwf
. Find these keys in theresourceBundle
file present for the same item descriptor (locale specific, for example,CustomCatalogTemplateResources_en.properties
).Use the following path for the Tomcat server:
ATG-DIR\DCS\buildtree\atg\commerce
Change this file in the
exe
installation and restart the server.The following is sample code for overriding the catalog icon:
catalogIconSwf=images/gray_x_icon.png catalogLargeIconSwf=images/gray_x_icon.png
The following is sample code when using Font Awesome icons instead of an image:
catalogIconSwf=fa fa-calculator catalogLargeIconSwf=fa fa-calculator
The following are customization examples:
MerchConfig.003
, for example, to specify a localized display string for the previous sku-color
example the following steps are necessary:
For the module containing the repository extension, ensure that the manifest file
META-INF/MANIFEST.MF
includes an"ATG-Class-Path"
entry that appends the module’s own classes and resources to the server class path.Create a file named
Resources.properties
, with the following content:categoryPresentation=Presentation sku.color=Color
Place the file into a directory named
my/module
, in the module’s class path.Modify the SKU item descriptor as follows:
<item-descriptor name="sku"> <table name="my_sku_extensions" type="auxiliary" id-column-name="sku_id"> <property name="color" data-type="string" column-name="color" category-resource="categoryPresentation" display-name-resource="sku.color"> <attribute name="resourceBundle" value="my.module.Resources"/> </property> </table> </item-descriptor>