WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • New Droplet: CreateToc
  • Print
Pages: [1]   Go Down

Author Topic: New Droplet: CreateToc  (Read 7924 times)

Offline BlackBird

  • Posts: 2573
New Droplet: CreateToc
« 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.
« Last Edit: November 16, 2011, 01:20:41 PM by BlackBird »
Logged
http://wbaddons.webbird.de Don't miss this

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: New Droplet: CreateToc
« Reply #1 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
Logged
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

mr-fan

  • Guest
Re: New Droplet: CreateToc
« Reply #2 on: November 16, 2011, 09:43:54 AM »
Quote from: 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

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
Logged

Offline warp

  • Posts: 4
Re: New Droplet: CreateToc
« Reply #3 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
« Last Edit: October 02, 2013, 02:00:13 PM by warp »
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • New Droplet: CreateToc
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2