14 Nov 2016

ATG 11.1 Merchandising Browse Customisation Part 2

Let's say we want to see child items for the postcode, city and county.
We should provide links definition in the /atg/remote/content/browse/ContentBrowseHierarchy.xml 

Insert the following into the xml so that Merchandising will know parent/child for each item:

<links id="postCodeLinks" parent-type="/cognity/estore/repository/AddressBookRepository:addressBookPostCode"> 
      <list-definition allow-circular-reference="false" visible="true" retriever="property" set-site-context-on-drilldown="false" allow-load="true" show-header="conditionally" id="postCodeChildStreets" show-count-on-header="false" allow-drilldown="true" child-type="/cognity/estore/repository/AddressBookRepository:addressBookStreet" show-count-on-children="false">
        <retriever-parameter name="propertyName" value="parentPostCodeId"/>
        <retriever-parameter name="reverseLink" value="true"/>
      </list-definition>
    </links>
    <links id="cityLinks" parent-type="/cognity/estore/repository/AddressBookRepository:addressBookCity"> 
      <list-definition allow-circular-reference="false" visible="true" retriever="property" set-site-context-on-drilldown="false" allow-load="true" show-header="conditionally" id="cityChildPostCodes" show-count-on-header="false" allow-drilldown="true" child-type="/cognity/estore/repository/AddressBookRepository:addressBookPostCode" show-count-on-children="false">
        <retriever-parameter name="propertyName" value="parentCityId"/>
        <retriever-parameter name="reverseLink" value="true"/>
      </list-definition>
    </links>
    <links id="countyLinks" parent-type="/cognity/estore/repository/AddressBookRepository:addressBookCounty"> 
      <list-definition allow-circular-reference="false" visible="true" retriever="property" set-site-context-on-drilldown="false" allow-load="true" show-header="conditionally" id="countyChildCities" show-count-on-header="false" allow-drilldown="true" child-type="/cognity/estore/repository/AddressBookRepository:addressBookCity" show-count-on-children="false">
        <retriever-parameter name="propertyName" value="parentCountyId"/>
        <retriever-parameter name="reverseLink" value="true"/>
      </list-definition>
    </links>