You are here

function tableofcontents_node_prepare in Table of Contents 7

Implementation of hook_node_prepare

File

./tableofcontents.module, line 176
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_node_prepare($node) {
  if (isset($node->files) && isset($node->body)) {

    // Remove the cached version if there are attachments on this node
    $cid = $node->format . ':' . md5($node->body);
    cache_clear_all($cid, 'cache_filter');
  }
}