Sunday, April 24, 2016

How to retain selected dimension under multi select dimension on front-end?

Behaviour As per default behavior of Endeca, Selected dimension does not return as part of Endeca query guided navigation response wheneve... thumbnail 1 summary
Behaviour
As per default behavior of Endeca, Selected dimension does not return as part of Endeca query guided navigation response whenever a multi-select dimension is selected. So selected dimension value does not get retained in left navigation.

Solution
Endeca OOTB creates a Breadcrumbs object and places all selected dimension under it. Find out solutions below :-

1. Using Cartridges JSP - This approach can display selected dimensions in either top or bottom of the selected dimensions, not in the order that was being displayed.
  1. Set BreadCrumbs object in request scope under Breadcrumbs.jsp. Use the Set  variable in RefinementMenu.jsp <c:set var="breadCrumbsContentItem" value="${content}" scope="request" />
  2. Use Breadcrumbs object in RefinementMenu.jsp and merge with Refinement menu Object
    <c:if test="${not empty breadCrumbsContentItem.refinementCrumbs}">
    <c:forEach var="dimCrumb" items="${breadCrumbsContentItem.refinementCrumbs}">
    <c:set var="dimensionName1" value="${dimCrumb.dimensionName}" />
    <c:if test="${dimCrumb.dimensionName eq refinementMenu.dimensionName }">
    <a href="${dimCrumb.removeAction.navigationState}">${dimCrumb.label}(${dimCrumb.count})</a>
    </c:if>
    </c:forEach>
    </c:if>
Multivalued Dimension selection using jsp approach


2. Using Cartridge Handler- Extend RefinementMenu cartridge handler and find out following steps 
  1. Get ENEQueryResults.getNavigation().getDescriptorDimensions() to get the selected refinements.
  2. Get RefinementMenuConfig object to get the dimension order that defined in Endeca Experience manager boosted or buried section.
  3. Merge the OOTB RefinementMenu object under process() method using step 1 and 2 objects.
Endeca Mulivalued dimension retaintion in same order


3. Disabled Dimension -  Click here to view.


From Author

Was this post resolve the solution you are looking for? what do you think about this solution?Provide your comments

No comments

Post a Comment

Text Widget