You are here

README.txt in Javascript Tools 5

Drupal dynamicload.module README.txt
==============================================================================

Module for implementing dynamic content loading in Drupal.

When enabled, links are replaced with javascript calls to dynamically
load only the requested page's content.

To test:

* Install and enable module
* Go to block configuration and click 'configure' for a block.
* For the settings in the 'dynamic loading' fieldset, select
  'Apply dynamic loading' and designate a target area (main content
  area or one of the enabled blocks).

Example usages:

A. Menu loads into main content area

1. With menu module, create a menu with links to several pages (nodes, etc.).
   Ideally, the pages would have little content, e.g., a short list of links.
   Enable and position the newly created menu block.
2. Configure the block created in step 1. Check 'Apply dynamic loading'
   and select "Main content area" as the target.

When users click on menu items, they load into the main content area.

B. A  menu block loads into a custom block.

1. With menu module, create a menu with links to several pages (nodes, etc.).
   Ideally, the pages would have little content, e.g., a short list of links.
   Enable and position the newly created menu block.
2. With the block module, create a block that will be the 'target' (where 
   content loads). Enable and position the newly created block.
3. Configure the block created in step 1. Check 'Apply dynamic loading'
   and select the block created in step 2 as the target.

When users click on links in the menu block, the content load into
the block module block. (Note: some page elements are left out for
pages loading into blocks instead of the main content area--breadcrumbs
tabs, etc.).

C. Dynamically load all content (experimental)

At Administer > Site configuration > Dynamicload, select the option to 
load all content. Set paths to exclude (generally recommended to exclude 
admin*).

All links will be processed and loaded dynamically.


Requirements
------------------------------------------------------------------------------
This module is written for Drupal 5.0+ and requires the Javascript Tools 
module to be enabled.


Developer usage
------------------------------------------------------------------------------
To trigger dynamic loading, include a "dynamicload" class on content. 
Individual links with the class will be loaded dynamically. E.g.,:

$link = l(t('my link'), 'my/path', array('class' => 'dynamicload'));

Alternately you can apply the class to an enclosing element and all links
contained in that element will be processed:

$output = '<div class="dynamicload"><a href="some/path">'. t('my text') 
.'</a></div>'

File

dynamicload/README.txt
View source
  1. Drupal dynamicload.module README.txt
  2. ==============================================================================
  3. Module for implementing dynamic content loading in Drupal.
  4. When enabled, links are replaced with javascript calls to dynamically
  5. load only the requested page's content.
  6. To test:
  7. * Install and enable module
  8. * Go to block configuration and click 'configure' for a block.
  9. * For the settings in the 'dynamic loading' fieldset, select
  10. 'Apply dynamic loading' and designate a target area (main content
  11. area or one of the enabled blocks).
  12. Example usages:
  13. A. Menu loads into main content area
  14. 1. With menu module, create a menu with links to several pages (nodes, etc.).
  15. Ideally, the pages would have little content, e.g., a short list of links.
  16. Enable and position the newly created menu block.
  17. 2. Configure the block created in step 1. Check 'Apply dynamic loading'
  18. and select "Main content area" as the target.
  19. When users click on menu items, they load into the main content area.
  20. B. A menu block loads into a custom block.
  21. 1. With menu module, create a menu with links to several pages (nodes, etc.).
  22. Ideally, the pages would have little content, e.g., a short list of links.
  23. Enable and position the newly created menu block.
  24. 2. With the block module, create a block that will be the 'target' (where
  25. content loads). Enable and position the newly created block.
  26. 3. Configure the block created in step 1. Check 'Apply dynamic loading'
  27. and select the block created in step 2 as the target.
  28. When users click on links in the menu block, the content load into
  29. the block module block. (Note: some page elements are left out for
  30. pages loading into blocks instead of the main content area--breadcrumbs
  31. tabs, etc.).
  32. C. Dynamically load all content (experimental)
  33. At Administer > Site configuration > Dynamicload, select the option to
  34. load all content. Set paths to exclude (generally recommended to exclude
  35. admin*).
  36. All links will be processed and loaded dynamically.
  37. Requirements
  38. ------------------------------------------------------------------------------
  39. This module is written for Drupal 5.0+ and requires the Javascript Tools
  40. module to be enabled.
  41. Developer usage
  42. ------------------------------------------------------------------------------
  43. To trigger dynamic loading, include a "dynamicload" class on content.
  44. Individual links with the class will be loaded dynamically. E.g.,:
  45. $link = l(t('my link'), 'my/path', array('class' => 'dynamicload'));
  46. Alternately you can apply the class to an enclosing element and all links
  47. contained in that element will be processed:
  48. $output = '
  49. .'
'