Hi,

Thank you for this module.
I wouldlike to close a div before the table of content and open another just after.
That is to say, I wouldlike to get :

</div>
<fieldset id="toc" class="toc">
...
</fieldset>
<div>

instead of :

<fieldset id="toc" class="toc">
...
</fieldset>

But I can't find where this fieldset is created. The function theme_tableofcontents_toc create a div and not a fieldset.
So could you possibly explain how does this work ?

Comments

AlexisWilke’s picture

We don't use a fieldset. Instead we have a div and some JavaScript code to "open & close" the summary.

Everything is done in the theme() call. So you should be able to change the last return with something like this:

return '</div>' . $output . '<div>';

Does that work for you?

Thank you.
Alexis

Jiou’s picture

Thank you for your answer.

Unfortunately it doesn't work for me. This has no effect.
In my case, the div becomes a fieldset in the html code. I thought it was done somewhere else in the module but I searched for a "fieldset" occurence and I didn't find anything.
When I create a div in the body, I have no problem, so I don't think a filter is responsible for that.

AlexisWilke’s picture

Title: Where "<fieldset>" is created ? » Where is the "<fieldset>" created ?
Issue tags: +fieldset

Jiou,

Although I'm not the first author of this module, I've revamped it quite a bit and I know I don't generate a field set. There is an example of the table on one of my websites:

http://linux.m2osw.com/booting

And it works as expected. You can open/close it, but there is no field set.

Speaking of which, it could be a good idea to use a field set instead of the JS we have now. Then the title could be put as the field set name.

Thank you.
Alexis

Jiou’s picture

Oh, I'm really sorry. I've just realized I created a template function long time ago, which is responsible for this.
Thank you for your help