WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Droplets & Snippets => Topic started by: BlackBird on November 15, 2011, 05:23:41 PM

Title: New Droplet: CreateToc
Post by: BlackBird on November 15, 2011, 05:23:41 PM
The CreateToc-Droplet creates a "Table of Contents" from all headings (h1-h6) in a page. The Toc is placed where you place the droplet call. In addition, a "Back to Top"-Link is added before each heading.

Download:

http://www.websitebakers.com/pages/droplets/downloads.php (scroll to "Navigation")

Usage:

[[CreateToc]]

or

[[CreateToc?float=right]]

...to have the Toc floated right. If you wish to have your entries numbered (like an index), add

[[CreateToc?float=right&number=1]]

(The value you give for "number" doesn't matter. You can also set it to "true" or "ohmy" or ...)

ToDo:

* At the moment, there's no indentation; i.e., in the Toc there's no difference between h1 and h6


Best use:

If you have just one WYSIWYG-Section on a page, you may create your own Toc by adding Anchors. But if you have more than one WYS-Section (or sections of other types), CreateToc creates a nice Toc for you. :)

Try it and let me know how it works.
Title: Re: New Droplet: CreateToc
Post by: Stefek on November 15, 2011, 09:09:40 PM
Good idea.

One just must be carefull by not using headings in the template itself (i.e. sidebars etc.).

Regards,
Stefek
Title: Re: New Droplet: CreateToc
Post by: mr-fan on November 16, 2011, 09:43:54 AM
Good idea.

One just must be carefull by not using headings in the template itself (i.e. sidebars etc.).

Regards,
Stefek

For this you could use a special Format within the CKEEditor to use a Class with the H1 - H3 and search with the Droplet for this CSS class....no problem....but this must be arranged by an admin or will be a good tut....;)

great idea bianka! - i will use it

regards mr-fan
Title: Re: New Droplet: CreateToc
Post by: warp on October 02, 2013, 01:57:35 PM
I would like to place the TOC of one page on a different subpage.
Would that be possible?

i.e all articles from http://kalfcomputertechniek.nl should be TOC'ed on
http://www.kalfcomputertechniek.nl/pages/artikellijst.php

I'm doing this now by hand & anchors but the labour in it is immens.

Thanks

Frank