Views Display Tabs

solipsist - July 3, 2009 - 12:29
Views Display Tabs exposes a view's displays as AJAXified tabs

Views Display Tabs exposes the displays of a view as tabs, making it possible to switch displays for a view using AJAX. This opens up the possibility to make a view even more useful as all overridable settings for a view can be stored in a display. This means that sorting, among many other settings a display can have, can now be exposed to the user through multiple displays with different sort settings.

Examples of use

Thanks to the configurability offered by a view's displays, Views Display Tabs opens up a lot of possibilities and can be used in many different ways. Here are some ideas:

  • A gallery page view that shows thumbnails or a simple list through separate displays using different style plugins.
  • A sortable page view that has two displays, one with ascending and the other with descending sort.
  • A page view that has one display showing just a few fields and another showing all fields, offering 'basic' and 'detailed' information.
  • A page view that has one display that just lists content and another that offers search through exposed filters.
  • A block view offering related information for a node through an argument handler, with a separate display for each content type.

How to install and use

  1. Download the module, extract it, then copy it your modules directory and enable it.
  2. Go to admin/settings/viewsdisplaytabs. You will see a list of views that have AJAX enabled. If there are no views in the list, make sure there's at least one view that has AJAX enabled. See instructions on the settings page for more information.
  3. Check the views you want to enable display tabs for and click Save.
  4. Your view's header will now list the displays as simple tabs. Clicking a display's tab will update the view and replace the current display with the one you clicked. This only works with AJAX at the moment (sorry, no graceful degradation for browsers with poor JavaScript support).

To learn how Views Display Tabs was used to build a Drupal site, check out this detailed blog post which applies to beta 3.

Does your view use exposed filters? If it does you may want to check out Views Live Filters, a module that applies exposed filters without requiring the user to click the Apply button each time.

The README file is somewhat wrong until beta 5 is released, it says Views Dispay Tabs renders tabs as a simple list when it in fact renders tabs as simple CSS tabs (as of beta 4).

Development of Views Displays Tabs was sponsored by SF Bio and NodeOne.

Downloads

Version Downloads Date Links
6.x-1.0-beta4 Download (12.54 KB) 2009-Jul-29 Notes


 
 

Drupal is a registered trademark of Dries Buytaert.