Check your version
This tutorial covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.
Render content which can be refreshed via Ajax.
Goal
Update the results of a view using Ajax.
Prerequisites
You will need the following knowledge and skills. If you need a review, check out the Additional resources section at the bottom of this page.
- Designing architecture to create Ajax behavior.
- Embed views programmatically.
- Return content via an Ajax request.
Tasks
Write the steps which will be involved in creating an Ajax-enabled content area. Begin with the step of getting markup of a rendered view, using the tids
from the user preferences as arguments.
Recap
- Any Ajax-related functionality needs to be well thought out.
- We can render views programmatically to create custom content in pages.
Further your understanding
- Continue to the next lesson: Movie Project: Create Custom Blocks.
Additional resources
- API Documentation: Ajax Framework (api.drupal.org)
- Documentation: Ajax in Drupal using jQuery (Drupal.org)
- Video: Ajax Framework in Drupal 7 (Drupalize.Me)
- API Documentation: views_embed_view (api.drupal.org)
- Documentation: D7: Embed a Views 3's result into a page (Drupal.org)