Closed (outdated)
Project:
Faceted Search
Version:
6.x-1.0-beta2
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Jul 2009 at 14:08 UTC
Updated:
24 Aug 2021 at 19:30 UTC
Jump to comment: Most recent
Comments
Comment #1
steveturnbull-2 commentedSo... I'm on my own then?
Comment #2
steveturnbull-2 commentedI'll log my progress so it should be of some help to someone else, sometime.
The specification has been clarified so I have a better idea of what's required. The client requires that the faceted search appears as normal except that each page can have one or more tabbed sections - one or more different sets of results based on the same faceted search except that it is additionally filtered by the tab setting.
So, for trees, there might be an additional taxonomy with "deciduous" and "evergreen". The client wants to be able to define a set of tabs for a given environment which might be, in this case, "All", "Deciduous" and "Evergreen" - while the normal faceted search blocks appear up the side. (Hope that makes sense.)
I am defining a new facet "Tabbedtax" which will build on taxonomy_facets. It has no 'sort' option in its definition (return array() from get_sort_options() method) so doesn't need methods that add sort information to the query object.
It's slow going as I'm having to figure out how facted search functions.
Comment #3
steveturnbull-2 commentedI changed the name of my new facet to "Tabbed". I then created three types of plugin Tab classes to go with the Tabbed facet. Each Tab class allows you to add an additional filter to the Faceted Search query. You can have as many Tab objects as you like for a given environment but only one is active at a time (the one for the Tab selected by the user).
The three Tab classes are as follows: A Taxonomy one that allows you to choose one or more Terms and filter by them (using OR) plus a NOT option; a Node Type one so you can choose one or more nodetypes and filter with those (using OR) plus a NOT option; the final one doesn't actually do anything, it can be used as as an "All" tab and doesn't apply any additional filtering.
The taxonomy class leverages the Taxonomy Facet table so that it selects by more than just the term.
Each instance of a Tab class has a name - which appears in the Tab onscreen - an ID which is used in the URL, and each instance can be selected as the default which is the one to apply when the faceted search environment is first entered.
With this structure in place it would be relatively easy to add additional Tab classes should they be required (like a date created/updated tab; an author tab - could be useful; a filter for every node that does (or doesn't) have attachments; or even a keyword tab - only allows nodes that contain certain words).
The next stage for me is to implement the theming changes to allow the Tabs to be displayed, and selecting the Tab filter through the URL.
Comment #4
steveturnbull-2 commentedIt seems to be impossible to include the Tabbed filter so that it can insert text into the URL, and still have it not appearing as a browsable option in a block (it has to be neither or both). So it became necessary to add the Tabbed filter as a query on the url: ?tabbed=all for example. I was able to add my own theming so that the tabs appear above the main page.
And it all works. I can have tabs which affect the filtering when I click them, as well as the standard faceted search interface. A good refinement would be to remove the link from the tab if results would be zero - this would be in keeping with the principles of faceted search.
As a rider to this, I now have to create another, completely different, faceted search UI for this same project. This one allows every term from a taxonomy facet to be displayed at the top of the screen, like buttons, and not to disappear if their results would be zero, but just to become inactive. With several other facets displayed as drop-downs.
Joy.
Comment #5
avpadernoI am closing this support request since it has been opened for a project version that isn't anymore supported.