Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
HI
We're using Ajax facets successfully with a number of our taxonomy vocabularies and it's working brilliantly.
Date facets provides a good solution for narrowing results chronologically, but doesn't work with Ajax facets.
Could you provide a bit more information about why this limitation exists?
Thanks in advance
Luke
Comment | File | Size | Author |
---|---|---|---|
#14 | d7_ajax_facets.patch | 447 bytes | fago |
Comments
Comment #2
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedHello lukus
Thank you for interest. It's very nice for me to receive feedback from active developers.
I understand your need and I have idea how to implement it.
It can be special class (actually facet widget) which will extend facet widget from module "Date facets" (and maybe not only from Date facets).
The main purpose of this class will be adding some things to ajaxify the existing facet widget.
It would be nice but it's just idea. I need some time to do it, but now I'm overloaded in the office.
Comment #3
lukusHey Eugene
Thanks for the info. I'd be happy to help with this, but would appreciate any steer you can give me to aid my progress.
I'll start taking a look at the code. Please let me know if you have any ideas I should consider.
Cheers
Luke
Comment #4
lukusComment #5
lukusHi there
I was wondering if you could provide an update re. this feature request. Do you know whether the functionality will be added to the ajax_facet roadmap in the near future?
Thanks
Luke
Comment #6
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedIt's interesting thing, but I have quite a few time.
I think that I'll come back to this issue in D8 version.
Comment #7
lukusHey there
We need to provide this functionality for a specific project, and are currently carrying out some investigation to decide on the best way to approach development.
Could you provide some brief notes that could support our investigation? You mentioned above that you'd aim to extend the facet widget from the Date Facets module. Are there any other guidelines that you think might be relevant?
Thanks in advance,
Luke
Comment #8
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedHey
I thought about it yesterday evening. Seems I know how to do it pretty easy. Let me check my theory today evening.
Comment #9
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedSo, I have checked it.
My vision is next:
Most of the widget looks like a bunch of check boxes or links. We need to be able to use something like API in ajax_facets, to force the widgets in other modules like date_facets, work by ajax.
We should be able to extend your existing logic ajax_facets to ajaxify new kinds of widgets easily.
I see that it requires pretty much changes and cannot be implemented in good way for D7.
I'll keep this issue in mind for D8.
Comment #10
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedComment #11
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedComment #12
lukusHey Eugene
Thanks for investigating! Just to make sure I understand what you're saying completely correctly—are you saying that it's not going to be possible in the D7 version, because the architecture won't support it?
If so, would you recommend we find a totally different solution?
Thanks for your time on this
Luke
Comment #13
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedIt's possible but it will be not good way. Unfortunately I have no enough time to implement temporary solutions and change them to good solutions later. I want to make good solutions only.
I don't think that you need totally different solution. My recommendation will be good for custom case as in your situation.
Date widgets are very similar to regular widgets for links and checkboxes from point of view of rendering. So you can handle them as ajax widgets for links and checkboxes but save logic to generate items in widgets according to type of data date.
Seems my english is so so. Sorry :)
You can write me into the skype with certain questions.
Comment #14
fagoI ran into the same issue and took a short look at the code. Eugene, I'm not sure why you think date facets should be handled differently - but the facet_api widgets treat term and date facet links just the same way. I tried, and it works just the same with ajax facet links.
Attached patch does the trick for me and makes the module work just fine with date facets.
That said, eugeneilyin thanks for contributing this module. It works great and is a big deal in improving facet UX!
Comment #15
fagoops, this patch is for d7.
Comment #16
efpapado CreditAttribution: efpapado at Ramsalt Lab commentedI tested this and it works very well. I suggest changing status to RTBC.
Comment #17
efpapado CreditAttribution: efpapado at Ramsalt Lab commentedFurther testing revealed a problem.
If one selects a year, and then a month, and then removes the year, the month is still selected.
Comment #19
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedIt's not a bug because it's different values of filters (different intervals).
Thank you @fago for such simple solution.
Committed.
Comment #20
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commented