I am currently implementing an automatic TOC to my site using Version 3.4. To do this, I created a new TOC-Block which is displayed on top of every node. The table of contents works like a charm, it is created exactly like I want it do. But apparently the anchor-links are only inserted into the node-text when using the [toc hidden:1]-Tag. Without a tag clicking on any TOC-Link doesnt result in anything.
So to achieve my wanted functionality a user would have to manually write [toc hidden:1] in every node he creates.
Is there any possibility to make TOC parse the node on creation even _without_ any [toc] tag in it?
Comments
Comment #1
AlexisWilke commentedHi Sagredo,
This is a bug. I guess the blocks are being built after the node. But I had not tested that very case you are talking about...
It should be easy enough to test in the filter whether there is a block. The only drawback is that you will have to have the filter turned on for your nodes... Hmmm... Unless I implement something in the nodeapi hook in which case I can put the anchors in the node at that point if a filter did not run on it.
Thank you for your report!
Alexis
Comment #2
andrewhthomas commentedSubscribing
Comment #3
AlexisWilke commentedOkay, I have a fix in the -dev which will appear in the next 12h. It will be in the next version.
Please test and let me know whether it works.
There is a new filter that you should NOT need. But if it does not seem to work without it, please, try with it too.
Thank you.
Alexis Wilke
Comment #4
AlexisWilke commentedActually, I'll mark this fixed. If you still have problems with the -dev version, feel free to re-open this issue. 8-)
Thank you.
Alexis