You are here

README.txt in Javascript Tools 5

Drupal tabs.module README.txt
==============================================================================

Created as part of a project sponsored by CivicSpace Labs, this module
provides methods for client-side tabbed pages, using the jQuery tabs
plugin by Klaus Hartl, http://stilbuero.de/tabs.

Requirements
------------------------------------------------------------------------------
This module is written for Drupal 5.0+.


Installation
------------------------------------------------------------------------------
Create a directory modules/tabs and copy all the module's files into
it. Enable the module via the administer modules page.


Testing
------------------------------------------------------------------------------
To test the module, you can download the DEV version and enable the 
Tabs Example module, then navigate to /tabsexample.


Developer usage
-----------------------------------------------------------------------------

Tabs are generated through forms-api-style arrays using two element types
defined in tabs.module: 'tabset' (a set of tabs) and 'tabpage' (a tab page on
a set of tabs).

Tabs can be returned as part of normal forms, or can be 'manually' rendered
through a call to the function tabs_render().

Sample usage:

  $form = array();

  $form['example1'] = array(
    '#type' => 'tabset',
  );
  $form['example1']['tab1'] = array(
    '#type' => 'tabpage',
    '#title' => t('One'),
    '#content' => t('First tab content.'),
  );
  $form['example1']['tab2'] = array(
    '#type' => 'tabpage',
    '#title' => t('Two'),
    '#content' => t('Second tab content.'),
  );
  $form['example1']['tab3'] = array(
    '#type' => 'tabpage',
    '#title' => t('Three'),
    '#content' => t('Third tab content.'),
  );

  return tabs_render($form);

For a form example, see the tabsexample.module file in the DRUPAL-5 branch
of the module, in the /docs directory.

File

tabs/README.txt
View source
  1. Drupal tabs.module README.txt
  2. ==============================================================================
  3. Created as part of a project sponsored by CivicSpace Labs, this module
  4. provides methods for client-side tabbed pages, using the jQuery tabs
  5. plugin by Klaus Hartl, http://stilbuero.de/tabs.
  6. Requirements
  7. ------------------------------------------------------------------------------
  8. This module is written for Drupal 5.0+.
  9. Installation
  10. ------------------------------------------------------------------------------
  11. Create a directory modules/tabs and copy all the module's files into
  12. it. Enable the module via the administer modules page.
  13. Testing
  14. ------------------------------------------------------------------------------
  15. To test the module, you can download the DEV version and enable the
  16. Tabs Example module, then navigate to /tabsexample.
  17. Developer usage
  18. -----------------------------------------------------------------------------
  19. Tabs are generated through forms-api-style arrays using two element types
  20. defined in tabs.module: 'tabset' (a set of tabs) and 'tabpage' (a tab page on
  21. a set of tabs).
  22. Tabs can be returned as part of normal forms, or can be 'manually' rendered
  23. through a call to the function tabs_render().
  24. Sample usage:
  25. $form = array();
  26. $form['example1'] = array(
  27. '#type' => 'tabset',
  28. );
  29. $form['example1']['tab1'] = array(
  30. '#type' => 'tabpage',
  31. '#title' => t('One'),
  32. '#content' => t('First tab content.'),
  33. );
  34. $form['example1']['tab2'] = array(
  35. '#type' => 'tabpage',
  36. '#title' => t('Two'),
  37. '#content' => t('Second tab content.'),
  38. );
  39. $form['example1']['tab3'] = array(
  40. '#type' => 'tabpage',
  41. '#title' => t('Three'),
  42. '#content' => t('Third tab content.'),
  43. );
  44. return tabs_render($form);
  45. For a form example, see the tabsexample.module file in the DRUPAL-5 branch
  46. of the module, in the /docs directory.