This module is valuable but the method of a adding a token is flawed for my purposes. I may end up making my own module to serve my needs (which duplicates effort, but time is valuable) but you may still consider my requirements.
1. Do not modify content. User may modify content (add token) but the module should never modify content. It should only filter content.
2. A token should not be used in teaser/summary to disable the TOC. A setting should be used to simply not render a TOC in teaser mode.
3. Use of a custom flag instead of a token would allow content creators to enable the TOC for select nodes without making any change to body text. The advantage here is that if the module is disabled tokens will not appear in place of the TOC.
Such fundamental changes may be problematic for existing installations though which is why I may create my own solution.
Comments
Comment #1
AlexisWilke commentedThere is no maintainer for version 7.x. If you're up for the challenge...
The number of installed for 7.x is rather small.
Now, you may want to read the entire documentation to understand why it works the way it is.
I did not try all the capabilities in 7.x, but in 6.x you can select a node type and create the table of contents in that type only.
As for not changing the contents, that's fine with me, but if you do want to have links that work, you probably want to get a <a name="..."> (anchor) on your headers. Without those your will generally not be able to create any table of contents or not one with links.
Finally, you can use the block to not insert the table of contents to the node. The use of the tag is not required. It is useful only if you want to place the table of contents in a specific location on your page.
Thank you.
Alexis Wilke
P.S. Look closely at the implementation of filters and you'll understand why teasers get the [toc: none] flag.
Comment #2
tangent commentedThank you for the fast response.
I only set this issue to 7.x because I suspected such fundamental changes as proposed here would not be considered in the 6.x version. I haven't actually tested the 7.x version since my current site is still on 6.x.
The block solution may be an option though it would require some theme help to be displayed between the node title and body.
I'll be taking a closer look at the code now.