1

I was able to create sort links on views using better exposed filters. I configured the sort filter sin such a way so I have one link that is ascending and another one descending, based on post date. This works very well. What would be amazing is if I could have one link that toggles achieving the behavior of the previously explained sort links. So for example when I'm first looking at the view sorted by ascending date I would get one exposed sort link that would sort by descending (most recent ↓). Then when I would be looking at the view sorted by descending date I would only get one exposed sort link that would sort by ascending (most recent ↑).

So in conclusion I want to combine the two views sort links that I have: most recent asc and most recent desc into one link that toggles between most recent ↑ and most recent ↓

Is there a way to do this with jQuery for example?

2

1 Answer 1

2

Right now, BEF doesn't have a lot of extra classes or IDs that would facilitate this. You could post a feature request in the BEF issue queue requesting the necessary additional markup that would make this fairly simple using jQuery.

At a minimum, you'd need some sort of "active" designation so you knew which link reflected the current sort options. Currently the active sort option is displayed as plain text (rather than a link) but there's an issue requesting the active sort be displayed as a link.

However, I should point out that I'll be out of town most of Aug and wont' be on the issue queue much... (I'm the BEF maintainer).

I'm always open to bounties! :)

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.