Active
Project:
Facet API
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Mar 2012 at 21:42 UTC
Updated:
23 Dec 2015 at 13:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
danielnolde commentedSounds definitely interesting, and like a good addition to facet_api_bonus!
Personally i have no experience on hierarchical taxonomy facets, so i'm not of great help in coding this.
Perhaps Chris Pliakas from facet_api has a hint for you where to begin?
Comment #2
merilainen commentedAlso interested to implement this.
Or another approach to at least give some option add markup to the massive "ul li" structure, which is difficult to theme at the moment, because the ul and li-elements don't have anything to grab with css selectors. If each level gets its own block, some massive categories will flood your blocks list.
Comment #3
ygerasimov commentedI don't think this issue is addressed to Facet API Bonus module as it only implements filters, dependencies etc. Here you ask to build custom taxonomy facet. I think this should be either separate contrib module or be considered by facet_api module itself.
Chris please advise what do you think about this?
Comment #4
cpliakas commentedThis is a pretty cool feature. I would say, thinking off the top of my head, that the current architecture isn't geared towards this type of thing. It is more focused on gathering data from a Solr field and faceting on that.
With that being said, I think we can probably hack our way around this using hook_facetapi_facet_info_alter() and filters. The short explanation is that we could clone the taxonomy facet 1 per level. So if we want to have three blocks for a three level hierarchy, we could do the following:
The code is specific to Apache Solr Search Integration but could probably be generalized and made available to other backends. Regarding the filters, we already have a filter in core Facet API that only displays the current level of the hierarchy. I don't see why we couldn't implement a filter with a condition that provides an option to "Only filter results in the Nth level of the hierarchy.". Then we would be done.
Would love to get someone to prototype this, and it could be a cool add-on module.
Chris
Comment #5
cpliakas commentedAttached is a screenshot of the "clones" taxonomy facets. Via the UI you could configure the hierarchy level filter for each facet.
Comment #6
androidado commentedHello, How Can I achieve that? Itś done in the UI?
Looking in the screenshot, it is showing the same options in the 3 levels,
> droswowra 26
> uiv 19
Are you sure it is working?
Comment #7
cpliakas commentedHi androidado.
As mentioned in #1493326-4: Split hierarchical taxonomy in multiple facets.:
So that is the missing piece. Someone is going to have to do a little leg work to push this through, but at the end of it will have a nice little module to maintain and contribute back.
Chris
Comment #8
sebas5384 commentedThis is great! also needed something like this in my project, so probably I'm going to do some hacking and try to send a nice patch to make this happen.
In my case, I need something like the menu_block in a form of a facet widget, where can be set the parent term or level to start showing the terms.
But first, i would like to ask you guys some orientations about things like AND/OR between the generated blocks, query being build, UI or performance issues.
Cheers!
Comment #9
drclaw commentedHello all,
The code snippet from comment #4 was very helpful! Thanks @cpliakas!
I wrote a filter plugin for facetapi_bonus to take care of the depth issue. The patch is here: #2056099: Add a filter plugin to only show items from a specific depth
Hope this helps someone!
drclaw
Comment #10
mokargas commentedWas this ever completed? Currently looking for a way to make a system identical to cpliakas 's screenshot from one taxonomy with nested parents.
Comment #11
jordiserra commentedany news on this issue?
Comment #12
marcoka commenteda cloning feature for all facets would be verry useful. not only to split up taxonomy.
lets say for example you have a page where you filter and the facets are dependent on each other. on another page you want to show them all without dependecies or differend widgets.
thats not possible because if you set a block to use widget select you can not change that on another page.
Comment #13
29axe commentedCould be a good feature
Comment #14
pyxio commenteddoes this solution only work for apachesolr module? is there a similar solution for search_api_solr?
Comment #15
maxplus commentedYes,
it would be great to have a similar feature like menu block to split up a taxonomy vocabulary into multiple facets, like described in #8