Loading...
 
Skip to main content

Feature request: Smart table of contents (ToC) display (depending on content size)

Status
Open
Subject
Feature request: Smart table of contents (ToC) display (depending on content size)
Version
18.x
9.x
Category
  • Feature request
Resolution status
New
Submitted by
fidel
Lastmod by
Philippe Cloutier
Rating
(0)
Description

General idea i mentioned in the irc-channel and which earned at least some positive feedback from @ohertel.

Feature:
Please add some kind of preference(s) allowing Tiki to determine automatically whether a table of contents should display in a given page.

If enabled it would automatically display a TOC in all articles/pages having at least x main-sections. This would avoid wasting space for superfluous ToC-s, or editors wasting time controlling TOC-s.


Example:
-----

  • Intelligent ToC is enabled and set to 3
  • I do create a new article which has only a small amount of text/content and is using only 2 main sections (i.e. !SectionA & !SectionB) -> results in an article with no ToC
  • If i do change the article now and add i.e. 1 new Sections (resulting in having 3 aka !Sections1, !Sections2, Sections3 including an automatically generated TOC






Solution
The client-side TOC (auto-toc) already hides if there is a single heading (lib/jquery_tiki/autoToc.js line 23 around r66000). The hardcoded "1" could be replaced with a variable defined elsewhere (since this is a pure JavaScript file).
Importance
6
Priority
30
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
4259
Created
Friday 06 July, 2012 11:00:10 UTC
by fidel
LastModif
Friday 15 June, 2018 20:39:47 UTC


Show PHP error messages