Hi Allen,

There's no built-in way with App Builder. The best way to present the 
information is a UI question; not sure what the best answer is. If you want to 
allow for two decades to be expanded at the same time -- or more generally, to 
allow the user to select more than one value -- you might use checkboxes for 
the facet values instead of the usual simple link.

I'd go looking for examples of what you want to do and find a good one to 
emulate. Amazon does nested facets, though I don't see examples of multiple 
selects combined with nesting. Whatever you come up with, if you implement it 
as an App Builder widget and put it on GitHub, others will be able to use it as 
well.

Dave.

--
Dave Cassel
Developer Community Manager
MarkLogic Corporation<http://www.marklogic.com/>
Cell:  +1-484-798-8720


From: Allen Boddie <[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Wednesday, October 29, 2014 at 4:34 PM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [MarkLogic Dev General] Customizing Facets in App Builder: Nested 
Facets


I am trying to extend the example Oscars application outlined in the
application builder documentation 
https://docs.marklogic.com/guide/app-builder.pdf.
What I would like to do is to show the year facet nested under the decade
facet, so you can expand each decade to select a given year or select the
entire decade at once.

>Decade 1950  <-expanded
      >1950
      >1951
      .....
>Decade 1960
>Decade 1970
>Decade 1980

In an earlier thread 
http://developer.marklogic.com/pipermail/general/2013-February/012306.html
an example was given of how to hide the year facet until the decade facet
is selected.

After reading this thread my first thought was to follow the
example of hiding the decade facet after it is selected and then displaying
the year facet. I would then add some code to change the label of the year
facet to match the selected decade.

While this might work for this simple example once the nesting is more
than two levels deep it would be confusing to the user. This simple solution
would also not allow for two decades to be expanded at the same time.
It seems this is a common task, is there some build in functionality of
the sidebar that can nest facets? Is there a better way to nest facets than my
clumsy workaround?


Thanks,

Allen

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to