Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/kongdmdu/pmichaud/pmwiki/cookbook/handytoc.php on line 46

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/kongdmdu/pmichaud/pmwiki/cookbook/handytoc.php on line 50

Warning: Undefined array key "" in /home/kongdmdu/pmichaud/pmwiki/cookbook/handytoc.php on line 34

Warning: Undefined array key "start" in /home/kongdmdu/pmichaud/pmwiki/cookbook/handytoc.php on line 35

Warning: Undefined array key "end" in /home/kongdmdu/pmichaud/pmwiki/cookbook/handytoc.php on line 36

Warning: Undefined array key "ignoreh1" in /home/kongdmdu/pmichaud/pmwiki/cookbook/handytoc.php on line 37

Warning: Undefined array key "class" in /home/kongdmdu/pmichaud/pmwiki/cookbook/handytoc.php on line 38
HandyTableOfContents-Talk - Cookbook - PmWiki

HandyTableOfContents-Talk

Summary: Talk page for HandyTableOfContents.
Maintainer: Kathryn Andersen
Users: +3 (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Comments

Russell Montgomery 10/11/2011 - The zip file indicates the version is 20070217 not 20070218

Charlie Hayes 2025-07-08: I might suggest modifying getInnerText() to check children[i].checkVisibility({visibilityProperty: true,}) before recursing. I'm using section edit links that are invisible until hover, and they are otherwise being included in the TOC for every item.

Markup issue

SteP 2010-11-21: Thanks for this recipe. Version 20070218 doesn't like mixing (:htoc:) with other markup on a single line. To remove this limitation change the code as follows:

Markup("handytoc", "directives", 
  "/\\(:htoc\s*(.*?):\\)/e",  //added ? after *
  "HandyTocProcessMarkup(\$pagename, '$1')");

Sandbox

Talk page for the HandyTableOfContents recipe (users).