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.
If a user selects a dependent facet, but then deselects the facet on which it was dependent, then the dependent facet information remains in the URL, even though it doesn't seem to do anything.
I did find this comment discussing the matter:
As you both say, it would of course be a really nice to have (but not more) to have such depending facets (who's dependency is not met) removed from the url, too - but this is rather nerd-cosmetics for most use cases, so i'm fine here.
I do need this, though. Any suggestions on where to start on adding this?
Comments
Comment #1
SpaceGoat1701 CreditAttribution: SpaceGoat1701 commentedI achieved this in my implementation by using the rewrite hook:
Obviously something more portable would be better, but this works for now.
Comment #2
Summit CreditAttribution: Summit commentedHi,
Anyone have another option for this please?
May be within the current module?
greetings, Martijn