[dokuwiki] Re: Collapsed TOC

  • From: "Sam Wilson" <sam@xxxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 4 Apr 2012 15:14:18 +0800

On Wed, April 4, 2012 3:01 pm, Dmitry Katsubo wrote:
> I wonder if it is possible to control the initial state of table of
> contents (if it will be collapsed or expanded). I would like to have TOC
> collapsed for certain pages, because they have very long TOC which (when
> expanded) forces left/right aligned images to shift down together with
> following content. The syntax something like:
>
> ~~COLLAPSEDTOC~~
>
> in page header. I have search the documentation but except
> http://www.dokuwiki.org/syntax#sectioning and
> http://bugs.dokuwiki.org/index.php?do=details&task_id=2473
> found nothing relative.
>

It's not quite what you're looking for, but you can set *all* ToCs to be
collapsed initially by adding the following to your template's script.js
(it's a bit hacky):

  jQuery('#toc__header').click();

I've got this one one of the sites I look after, and people have said they
prefer it.

- Sam.


--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: