You are here

README.txt in Table of Contents 6.2

Same filename and directory in other branches
  1. 5.2 README.txt
  2. 5 README.txt
  3. 6.3 README.txt
  4. 7.2 README.txt
  5. 7 README.txt
Table of Contents Module 2.3
============================

This is a module to generate a jQuery enabled mediawiki-like collapsible table
of contents section based on header tags.

Project Page: http://drupal.org/project/tableofcontents

Written by Andrew Berry with many contributions: andrewberry@sentex.net,
  http://drupal.org/user/71291

Sponsors have included the University of Guelph Central Student Association
(http://www.csaonline.ca/) and Pinchin Environmental (http://www.pinchin.com/).

Notable features:
	- Preserves attributes on the header tags
	- Checks for existing ID on headers and uses that if found (if none, creates one).
	- Handles duplicate heading titles cleanly when generating ID's.
	- jQuery script to make the Table of Contents collapsible. Currently using
	  the slideToggle function. Simply change line 4 of tableofcontents.js to
	  use a different transition. For more information on jquery and
	  transitions, see http://visualjquery.com.
	- Configurable minimum and maximum heading levels.
	- Able to configure options across the site, or on a per-page basis.
	- Sensible default theming and CSS. Both can be easily overridden in your
	  theme to make each Table of Contents look as you want.

1. Installation
---------------
a. place the contents of the tableofcontents directory in your modules directory. 
b. enable Table of Contents and Heading Anchors at admin/modules
c. enable the filters itself at admin/input formats, and add each of the desired
   filters to your input types. Be sure to set headinganchors to be before the 
   tableofcontents filter.
d. If you are using Drupal 6, or the HTML Corrector Filter in Drupal 5, the
   HTML Corrector filter must be placed *after* the Table of Contents filter.
   This is due to a bug in the HTML Corrector filter, which is included in
   Drupal 6: http://drupal.org/node/222926. Once this bug is fixed, then it
   will be able to be placed before these filters, ensuring that code being
   processed is correct.

2. Use
------
Place the table of contents marker (<!--tableofcontents-->) at any point in a
page to generate a table of contents at that location. It may be used multiple
times for muliple table of contents. The options defined in the first marker
will be used for all subsequent markers on the same body. Several options are
supported with the following syntax:

<!--tableofcontents option:value;-->
a. title: Override the default "Table of Contents" title. This setting is piped
   through t() for translation.

b. list: Choose an ordered list (ol) or an unordered list (ul).

c. minlevel: The minimum heading level for table of contents entries. Defaults to <h1>

d. maxlevel: The maximum heading level for table of contents entries. Defaults to <h3>

e. attachments: Choose to show attachments (1) or hide them (0). Defaults to 0.

e. Example marker with default values:
   <!--tableofcontents list:ol; title:Table of Contents; minlevel: 2; maxlevel: 3; attachments: 0;-->

3. Removal / Deinstallation
---------------------------
No database tables are created. To remove the module, just disable and delete
the module. The <!--tableofcontents--> tags may be removed if desired however,
the tag is an HTML comment so it will be ignored by the renderer when the
module is deleted (or the filter disabled).

4. Notes
--------
As I extended this module for use on in a specific site, I haven't had the
chance to test extensively across many themes and/or browsers. So far, it seems
to work fine on Zen, Bluemarine, Garland, and Bluebreeze on IE7, FF3, and
Safari. Different themes render ol and ul differently so you will probably
need to tweak the CSS to get the ToC to display to your liking for a particular
theme.

File

README.txt
View source
  1. Table of Contents Module 2.3
  2. ============================
  3. This is a module to generate a jQuery enabled mediawiki-like collapsible table
  4. of contents section based on header tags.
  5. Project Page: http://drupal.org/project/tableofcontents
  6. Written by Andrew Berry with many contributions: andrewberry@sentex.net,
  7. http://drupal.org/user/71291
  8. Sponsors have included the University of Guelph Central Student Association
  9. (http://www.csaonline.ca/) and Pinchin Environmental (http://www.pinchin.com/).
  10. Notable features:
  11. - Preserves attributes on the header tags
  12. - Checks for existing ID on headers and uses that if found (if none, creates one).
  13. - Handles duplicate heading titles cleanly when generating ID's.
  14. - jQuery script to make the Table of Contents collapsible. Currently using
  15. the slideToggle function. Simply change line 4 of tableofcontents.js to
  16. use a different transition. For more information on jquery and
  17. transitions, see http://visualjquery.com.
  18. - Configurable minimum and maximum heading levels.
  19. - Able to configure options across the site, or on a per-page basis.
  20. - Sensible default theming and CSS. Both can be easily overridden in your
  21. theme to make each Table of Contents look as you want.
  22. 1. Installation
  23. ---------------
  24. a. place the contents of the tableofcontents directory in your modules directory.
  25. b. enable Table of Contents and Heading Anchors at admin/modules
  26. c. enable the filters itself at admin/input formats, and add each of the desired
  27. filters to your input types. Be sure to set headinganchors to be before the
  28. tableofcontents filter.
  29. d. If you are using Drupal 6, or the HTML Corrector Filter in Drupal 5, the
  30. HTML Corrector filter must be placed *after* the Table of Contents filter.
  31. This is due to a bug in the HTML Corrector filter, which is included in
  32. Drupal 6: http://drupal.org/node/222926. Once this bug is fixed, then it
  33. will be able to be placed before these filters, ensuring that code being
  34. processed is correct.
  35. 2. Use
  36. ------
  37. Place the table of contents marker () at any point in a
  38. page to generate a table of contents at that location. It may be used multiple
  39. times for muliple table of contents. The options defined in the first marker
  40. will be used for all subsequent markers on the same body. Several options are
  41. supported with the following syntax:
  42. a. title: Override the default "Table of Contents" title. This setting is piped
  43. through t() for translation.
  44. b. list: Choose an ordered list (ol) or an unordered list (ul).
  45. c. minlevel: The minimum heading level for table of contents entries. Defaults to

  46. d. maxlevel: The maximum heading level for table of contents entries. Defaults to

  47. e. attachments: Choose to show attachments (1) or hide them (0). Defaults to 0.
  48. e. Example marker with default values:
  49. 3. Removal / Deinstallation
  50. ---------------------------
  51. No database tables are created. To remove the module, just disable and delete
  52. the module. The tags may be removed if desired however,
  53. the tag is an HTML comment so it will be ignored by the renderer when the
  54. module is deleted (or the filter disabled).
  55. 4. Notes
  56. --------
  57. As I extended this module for use on in a specific site, I haven't had the
  58. chance to test extensively across many themes and/or browsers. So far, it seems
  59. to work fine on Zen, Bluemarine, Garland, and Bluebreeze on IE7, FF3, and
  60. Safari. Different themes render ol and ul differently so you will probably
  61. need to tweak the CSS to get the ToC to display to your liking for a particular
  62. theme.