Question

I have created a page using Views and it works fine. I want to add an AJAX filter to this page to allow visitors to filter the contents based on PubDate or by Taxonomy/Vocabulary for this content type. How can I accomplish this?

Was it helpful?

Solution

  1. Edit the view, and add a filter to the page:

    • Drupal 6: Third column, section is called Filters
    • Drupal 7: First column, section is called Filter Criteria
  2. When you configure the filter, you want to expose it:

    • Drupal 6: Click the Expose button in the top right of the configure area
    • Drupal 7: Check Expose this filter to visitors, to allow them to change it
  3. Enable AJAX:

    • Drupal 6: Use AJAX is under Basic settings in the first column
    • Drupal 7: Use AJAX is under AdvancedOther in the third column

When the view is saved, there will now be a form that'll allow users to filter the view dynamically via AJAX.

OTHER TIPS

Maybe, you can use the Better exposed filters module to change output of your filter items to links.

And Use AJAX option in Advanced settings of a view to make filtering ajaxifyed.

http://drupal.org/project/better_exposed_filters

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top