1

I haven't been able to find the answer by searching, so i thought I would pose this question, I realize there may be more than one right answer, but basically I want to link to a specific result of an exposed filter without having to disable ajax.

I have a block created by a view on a panels page which will have the latest 4 magazine issues. (image and link) I want to link to a specific result in the exposed filter, when the user clicks-through.

The exposed filter has year (-3+3) and season which has the taxonomy terms (fall, winter, spring, summer) The default (when terms are not selected) is to show 4 of the latest magazine issues sorted by most recent. Since there are only 4 issues per year and the year will be relative to "now"; Would the way to go about this be to clone the view with the exposed filter page 4 times for each season? How would one re-write the link to go to that specific result in the exposed filter? I'm sure there are other options, to achieve this, so please let me know.

Thanks.

1 Answer 1

1

You could disable ajax, and then set your exposed filter to the relevant values for each link, and then save the url of each page.

Then re-enable ajax however use the links you previously saved to create hard coded links to the view with specific filters.

This works because even if ajax is enabled you can still pass in arguments via the query string.

3
  • I have two variables though, so Im trying to understand how i can make sure that the user gets to the correct issue. so my path looks like this...Publications/Magazine/Archives?field_year_value%5Bvalue%5D%5Byear%5D=2014&field_issue_tid=1155 Im trying to figure out how I can direct them to the current year (now) and the Fall, Winter, Spring, Summer for that year.
    – MRC
    Commented Apr 27, 2014 at 16:50
  • To create a link to a specific season then you will need to specify more than just the year. Create an new exposed filter to allow you to enter a date range. Then you can (with ajax disabled) set the date range from 21st Sept to 21 Dec (Autumn or Fall) and save the link. Repeat for other seasons to get all the links you need and then re-enable ajax.
    – Felix Eve
    Commented Apr 28, 2014 at 7:51
  • great thanks for your help. I already have the year only as a custom date format and the season broken up into taxonomy terms, so I just need to figure out the correct pattern and create the direct link. Thanks for your help, I think this is the right track, i just need to implement. Cheers
    – MRC
    Commented Apr 28, 2014 at 13:10

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.