AJAX Views: Block paging of a View via AJAX

This module, AJAX Views, provides a mechanism for a View block to have AJAX based pagination.

Getting Started:

  1. Create or edit a View
  2. Specify a Page view of any type
  3. Specify a Block view with "AJAX Paging Block View" type and the node count you want on each page
  4. Specify an argument of type "AJAX Views: AJAX Selector" with "Display all values" specified
  5. If you have other arguments, make sure there are valid wildcards for them
  6. Finally, either embed your view in a page via views_build_view('block', $view) or put your block in a region

Theme support:
This module has outstanding theming support. You can customize nearly any part f the rendering for all blocks/pages or specific renderings. The following are theme hooks implemented in AJAX views.

  • theme_views_ajax - Traffic cop theme function to render both the block wrapper and the ajax content that is held within the wrapper. This is a global override theme function, most likely you will leave this alone.
  • theme_views_ajax_block - Theme function to render the body of the ajax-ified block (including what Javascript and CSS is executed/included)
  • theme_views_ajax_block_[viewname] - Same as theme_views_ajax_block but for a view with a specific name
  • theme_views_ajax_page - Theme function to render the dynamic ajax page that is served to the block
  • theme_views_ajax_page_[viewname] - Same as theme_views_ajax_page but for a view with a specific name
  • theme_views_ajax_page_item - Theme function to render the dynamic ajax page individual items.
  • theme_views_ajax_page_item_[viewname] - Same as theme_views_ajax_page_item but for a view with a specific name
  • theme_views_ajax_block_pager - Theme function to render the paging links at the bottom of the ajax page

TO-DO:

  • Better support for view arguments
  • Better documentation

This project is sponsored by Phase2 Technology

 
 

Drupal is a registered trademark of Dries Buytaert.