You are here: Foswiki>Tasks Web>Item2317 (14 Aug 2011, PadraigLennon)Edit Attach

Item2317: Generate TOC from VIEW_TEMPLATE

Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: TocPlugin
Reported By: LarsEik
Waiting For:
Last Change By: PadraigLennon
Currently it is not possible to have %TOC% outside the %TEXT% in a VIEW_TEMPLATE.

I hope this is recognized as a necessary thing, although not very important. It gives a better professional impression when making wiki applications where end-users can edit without having to relate to %TOC% or other 'strange' text within their contents.

See Foswiki:Support.Question306

-- LarsEik - 01 Nov 2009

I would also like to see this.. Hiding such things can make life much easier when trying to get new users on board

-- PadraigLennon - 01 Nov 2009

See also Item2509

I suspect that because of the way TOC works, it's highly unlikely this can be done. But it's a worthwhile enhancement.


-- CrawfordCurrie - 29 Jun 2010

Feedback was added to Item2509

-- KennethLavrsen - 09 Nov 2010

Sorry for the duplicate post with Item2509 . Even with the workarround it doesn't show content of the whole topic but only the content of the viewTemplate itself. I tried with the Sandbox example from Item2509 and even more permutations - nothing gets TOC to show the real content of the whole topic. Can anyone confirm this is a general problem with 1.1.1 and has there been a fix meanwhile?

Kind regards

-- EnrikGuenter - 09 Nov 2010

I removed all the spam from the original test topic in Sandbox web. The workaround works for me but, well, it's only a workaround. Enrik, what behaviour do you expect?

-- MartinKaufmann - 09 Nov 2010

Well, actually i just want the same behaviour as in the Sandbox example. On your page i see:


ViewTemplate Header

TocTest Header

When i copy the TocTest and TocTestViewTemplate from your site with ?raw=all and insert it in my Sandbox, then i see:



ViewTemplate Header


ViewTemplate Header

"Überblick" is "overview" or in this case table of content in german. Any ideas? Can it be a diffrent TOC code version?

Kind regards!

-- EnrikGuenter - 11 Nov 2010

Tested: Disable all plugins. No effect.

-- EnrikGuenter - 12 Nov 2010

Tested: Disable Internationalisation / UseLocale. No effect.

-- EnrikGuenter - 19 Nov 2010

I'm starting to think there i something wrong with my foswiki. Can anyone conform that the workarround from the does not work with 1.1.2 anymore??

-- EnrikGuenter - 24 Nov 2010

Just wondering if anyone got this working?

-- PadraigLennon - 13 Jun 2011

Elegant workaround from another task.. Tasks.Item5427


-- PadraigLennon - 14 Aug 2011

ItemTemplate edit

Summary Generate TOC from VIEW_TEMPLATE
ReportedBy LarsEik
Codebase 1.1.2, 1.0.10
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Engine
Component TocPlugin
Priority Normal
CurrentState Confirmed
TargetRelease n/a
ReleasedIn n/a
Topic revision: r12 - 14 Aug 2011, PadraigLennon
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy