I created a patch, which adds blocks for every facet (these blocks contain only one facet). This is additionally to the guided search block, which contains every activated facet. This feature has to be activated in the faceted search environment in the guided search fieldset.
Having separate blocks is very useful, e.g. I can display a block with my top 10 categories on the front page, which links to the faceted search, which then displays all my activated facets.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | faceted_search_ui_blocks1.patch | 4.51 KB | mh86 |
| faceted_search_ui_blocks.patch | 4.4 KB | mh86 |
Comments
Comment #1
mh86 commentedattached a updated patch which fixes the naming of the blocks
Comment #2
David Lesieur commentedThis is a very valuable feature, which I had omitted mainly because users will have to re-weight each block in the block administration interface (even though facets are already weighted) when multiple blocks are used on the same pages. However, I think that some people still need this additional flexibility.
There is still some issue with the naming of the blocks. You should use the
get_label()method on the filter object rather than access the private_fieldmember, which is only available with CCK facets. To make sure everything works, you could test with other types of facets, like Taxonomy Facets, Content Type Facet and Author Facet.How multiple blocks are handled in
faceted_search_ui_guided_block()is very inefficient. Theforeachloop should only be executed when$filter_indexis null. When it is not null, you may call$search->get_filter($filter_index)to retrieve the right filter without looping.Also, please improve the labeling of the new option. There is a typo ("seperate" instead of "separate"), and a misleading term in the description ("category" instead of "facet"). Actually, I'd like to suggest the following changes for improved usability:
One last thing that slightly annoys me is the fact that each block gets the same "Guided search" title, and the same "Click a term to initiate a search." tip. I'm sure that many people will want to use more than a single facet block at a time, but no one will want those elements to be repeated on the page. Any idea on how to avoid this?
Comment #3
asak commentedAny news on this?
Cool feature...
Comment #4
student297 commentedis this patch working?
I am looking for this feature.
Comment #5
mikeytown2 commented+1 for 6.x
Comment #6
David Lesieur commentedMarked #230343: Multiple Customizable Blocks (Faceted Taxonomy Groups) as duplicate.
Comment #7
yngvewb commentedCool, I was just looking for this feature, is someone using this?
Comment #8
burlinwall commented+1 for 6.x
Comment #9
xiaoqiang commentedIs the patch working for the 6.x? anyone testing on the drupal6 and 6.x version?
Comment #10
jakowski commentedDavid, I found the text "Click a term to initiate a search." on line 1468 and 1486 in four locations in the file entitled 'faceted_search_ui.module', deleted everything within the apostrophes and it went away. Maybe there's a better way to do this, as it will probably re-appear when you update the module, but that's what I did for the time being. It would be cool to be able to change this in an admin section somewhere.
As for the "guided search" title, just put
<none>in the title field and it will go away.