Chapter 9. Customizing the category display page 195
9.3 Drill down menu
We add to the page a menu panel from which the customer can select a value or
value ranges for the features defined in OmniFind Discovery Edition for the store.
When the customer selects a feature value or a value range from the menu
panel, the system returns a search result page, which displays the products that
match the customer’s selection.
Narrowing a search in this way is called drill down. We add the drill down menu
on the left side of the page underneath a menu, which the page already has,
showing subcategories of the chosen top level category. We implement this by
including a JSP fragment very similar to the one described in detail in 6.5,
“Implement refinement list JSP fragment” on page 106.
9.3.1 Importing packages
For this customization, we import OmniFind Discovery Edition packages, just as
in 9.2.1, “Importing packages”.
9.3.2 Determining where to insert new code
By inspecting the original code of the page, we determine that the existing menu
under which we wish to create our drill down menu is rendered by this code:
We insert our code after that point.
9.3.3 Configuring the connection
Add the code to configure the connection to the OmniFind Discovery Edition
server, as described in 9.2.3, “Configuring the connection” on page 184.
9.3.4 Running the search
To generate a drill down menu, first run a search to find what feature values there
Our code uses the QueryHandler to do a search. We require a search constraint.
In this case, we define the constraint to be that the Category feature must not be
null. The identifier of the Category feature in our store is sitemap taxonomy.