Mandatory facets
ErwanF - June 17, 2009 - 18:07
| Project: | Faceted Search |
| Version: | 6.x-1.x-dev |
| Component: | Taxonomy Facets |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
| Issue tags: | change, choose, force, pre-selection, preselection, taxonomy, term, vocabulary |
Jump to:
Description
Hello David,
This could be a support request and not a feature request : I am wondering how I could provide a faceted search with a term from a single and precise vocabulary necessarily pre-selected. Internauts could:
- change the pre-selected term from this vocabulary;
- choose (or uncheck) any other term in other vocabularies, CCK entries (provided through CCK facets module), etc.;
BUT they can't uncheck everything; a term from this single predefined vocabulary must be always selected (otherwise they'll get duplicate contents).
Do you think this is achievable already with you set of modules ? If yes, how ?

#1
I have initial documentation on how to set the default taxonomy value within a module. The documentation is within the Hierarchical Select issue queue waiting for review. Hierarchical select provides a front end interface to force the user to meet certain depth requirements. I do not know if this is checked on the back end.
#2
Thank you MGParisi for your answer. But the HS module, though it looks very promising, is still unstable on Drupal 6 at the time of writing. Do I absolutely need this module? Anyway, please could you drive me with a link to your initial documentation?
#3
Because of the way the user interface is currently built, once a term is selected in a facet you don't have access to other terms in the same facet, requiring you to first unselect the current term before choosing another. This is opposite of what you need for your mandatory facet.
What you could do with the current features we have is build a separate search environment for each term in your mandatory vocabulary, have this environment display a view filtered by that term, and then create a custom block with simple links to each of those environments. Your mandatory vocabulary would be accessed by that block rather than a real facet. This may not make sense if you have a lot of terms, and switching environment through those links will cause the user to lose his current search. You judge if that's good enough for your project.
The ideal solution would require some coding.
#4
I see. Thanks a lot David for this answer, I will think about this.
#5
Now that they opened up documentation, and that I have Doc Admin priv's, I will try to create a few pages on how to do this. The thing is, its not unique to Hierarchical select, but can predefine any taxonomy. So the documentation will need work.
#6
Thanks for your efforts, MGParisi.