function tableofcontents_init in Table of Contents 6.2
Same name and namespace in other branches
- 6.3 tableofcontents.module \tableofcontents_init()
- 7 tableofcontents.module \tableofcontents_init()
Implementation of hook_init()
We have to load the JS here since we are now caching the filter results
File
- ./
tableofcontents.module, line 31 - This is a filter module to generate a collapsible jquery enabled mediawiki style table of contents based on <h[1-6]> tags. Transforms header tags into named anchors.
Code
function tableofcontents_init() {
drupal_add_js(drupal_get_path('module', 'tableofcontents') . '/tableofcontents.js');
drupal_add_css(drupal_get_path('module', 'tableofcontents') . '/tableofcontents.css');
}