I may be missing something here, but from what I read, the idea of the toc is that if I define a heading as h2 or h3, the toc module creates a link within the doc to that heading. However, whenever I create a toc, the table is outputted and formatted correctly, but the links don't work. html view of the page shows:

<div class="node">
 <div class="content">
<div class="toc">
<h2 id="TableofContents">Table of Contents</h2>
<ol>
<li><a href="#">first heading here</a></li>
<li><a href="#"> second heading here</a></li>
<ol>
<li><a href="#">sub heading</a></li>
<li><a href="#">another sub heading</a></li>

</ol>
<li><a href="#">third heading </a></li>
</div>


<h2 id="firstheadinghere">first heading here</h2>
<p>
text for heading blah blahblah blahblah blah
</p>
<h2 id="secondheadinghere"> second heading here</h2>
<p>
text for heading blah blahblah blahblah blah 
</p>

<h3 id="subheading">sub heading</h3>
<p>
text for heading blah blahblah blahblah blah 
</p>
<h3 id="anothersubheading">another sub heading</h3>
<p>
text for heading blah blahblah blahblah blah 
</p>
<h2 id="thirdheading">third heading </h2>
<p>
text for heading blah blahblah blahblah blah 
</p>

please point me in the right direction!

Comments

deviantintegral’s picture

I just realized that version 2.0 wasn't showing up on the main page, and that I had to modify that in addition to creating the release. Can you please try the 2.0 release and then let me know if you're still having problems?

Thanks,
--Andrew

misterphil’s picture

thanks for that - everything now works when logged in.
other feedback:

TOC appears but links don't work for non-logged in ie6 users
TOC table stretches across screen in ie6 and appears as a block in firefox

works a charm for me - just what I needed!

thanks for the support

billyboylindien’s picture

I've the same probleme with the
5.x-2.0 and 5.x-2.x-dev release.
Have you modify something ?

How can I correct this ?

deviantintegral’s picture

The issue with the styling is a quick fix. I'd forgotten to put in the IE6 specific code, as it doesn't support the min-width or max-width properties. Fscking IE :P

For now, the best solution is to add the following to your fix-ie.css:

.toc {
  width: 75%;
}

Once I figure out the best way to deal with this (right now the css is added with drupal_add_css) I will do a patch.

As for the issues with the missing anchors, I'm not having any problems with my copy of IE6. Can you try on a bare install of Drupal? What other input filters do you have installed?

--Andrew

silurius’s picture

Just wanted to chime in and say that I experience the anchor issue under IE 7.0.5730.11 (5.x-2.0). Clicking on a toc link corresponding with an H3 tag will jump but the H4's will not. Using the following for the marker: <!--tableofcontents list:ul; title:Table of Contents; minlevel: 1; maxlevel: 5;-->. Works great all around under new versions of FF, Opera & Safari.

This is PHP page. Filters are ordered as follows:

0 - PHP evaluator
1 - Hide email addresses (SpamSpan module)
2 - Headings to Anchors
3 - Table of Contents

sonden’s picture

Having the same issue here. The TOC would just look fine but if i click on any link in Firefox 2 and Konqueror under Linux the cursor would jump to the beginning of the page and not to the designated section, all links having the structure

URL/content/Title#

sonden’s picture

I figured it out for myself. Hope that helps anybody!

I had to place the Headings to Anchors filter before the Table of Contents in the input formats rearrange settings.

deviantintegral’s picture

Version: 5.x-1.x-dev » 5.x-2.x-dev
Status: Active » Closed (fixed)

I've found a way to deal with the IE6 lack of max-width via a CSS hack. I've applied it to CVS and it will be released in the default CSS in the next version.

--Andrew

peterh’s picture

Yes indeed!

Your comment solved the puzzle

'Headings to Anchors' should go before 'Table of Contents', should have less weight.

Many Thanks