Absolutely brilliant, Thanks a great lot. Is there an easy way to include a scriptaculous scroll effect, the .js is already called..
Wouter
I suppose that depends on what you want the script to do and what needs to be present in the html code for the script to work. The plugin is not set up with parameters for adding extra attributes (such as onclick) to the TOC links right now, so if that’s what you need, you would need to modify the source code. If you need something else, it may or may not be possible with the code as it is currently written.
It’s hard to know from your description what’s causing the problem, but it sounds like you’ve put the output marker twice on the same page ( <!--#toc_plugin#_TOC_OUTPUT--> ). If that’s the case, you could start by deleting one of them.
There may also be a conflict with another plugin, but I haven’t experienced that myself.
Other than that, nothing else comes to mind at the moment, but I’m sure there could be other factors.
Thak you very much, Paul !
I test with a different configuration.
Just a question :
Can y put those tags anywhere ( for example in a template ?) and arround the [*#content*] of my page, for exemple like :
<!--#toc_plugin#_START_TOC_INDEXING-->
[*#content*]
<!--#toc_plugin#_END_TOC_INDEXING-->
And put the <!--#toc_plugin#_TOC_OUTPUT--> in a other div on my template, outer the content layer ?
Paul,
I have tested your plugin in differents Modx install (all are 0.9.6). But nothing takes place.
I deactivated all plugins using WebPagePrerenderer. But no issue !
Here are the made operations :
1) I copy and paste all the content of your Page_TOC_Generator_0.76.txt in a new plugin, named : Page TOC Generator. And i active (and only active this) the case : OnWebPagePrerender.
2) I create a new document using the minimal template of Modx and put this html code :
<!--#toc_plugin#_START_CONFIGURATION-->
<!--#toc_plugin#_list_type=ul-->
<!--#toc_plugin#_start_level=2-->
<!--#toc_plugin#_end_level=3-->
<!--#toc_plugin#_header=Page Contents-->
<!--#toc_plugin#_header_tag=h2-->
<!--#toc_plugin#_parent_tag=div-->
<!--#toc_plugin#_parent_tag_id=toc-->
<!--#toc_plugin#_END_CONFIGURATION-->
<!--#toc_plugin#_TOC_OUTPUT-->
<!--#toc_plugin#_START_TOC_INDEXING-->
<h2>Here is a heading</h2>
<p>Here is some text</p>
<h2>Here is another heading</h2>
<h3>Here is a subheading</h3>
<h3>Here is another subheading</h3>
<!--#toc_plugin#_END_TOC_INDEXING-->
So, exactly the same that in the example given in the plugin.
Regrettably, tags are not interpreted in the html output. ) That here is:
<!--#toc_plugin#_START_CONFIGURATION-->
<!--#toc_plugin#_list_type=ul-->
<!--#toc_plugin#_start_level=2-->
<!--#toc_plugin#_end_level=3-->
<!--#toc_plugin#_header=Page Contents-->
<!--#toc_plugin#_header_tag=h2-->
<!--#toc_plugin#_parent_tag=div-->
<!--#toc_plugin#_parent_tag_id=toc-->
<!--#toc_plugin#_END_CONFIGURATION-->
<!--#toc_plugin#_TOC_OUTPUT-->
<!--#toc_plugin#_START_TOC_INDEXING-->
<h2 id="here-is-a-heading">Here is a heading</h2>
<p>Here is some text</p>
<h2 id="here-is-another-heading">Here is another heading</h2>
<h3 id="here-is-a-subheading">Here is a subheading</h3>
<h3 id="here-is-another-subheading">Here is another subheading</h3>
<!--#toc_plugin#_END_TOC_INDEXING-->.
Did anybody meet a similar problem?
I just uploaded a newer version. It appears as if the latest version had not been placed on the MODx repository. Give that one a try. If you still have problems, let me know.