Tags:
create new tag
view all tags

Question

It appears you can not use a TOC variable in a template or skin. even if you hard code the topic's name as a parameter to TOC it only shows on pages other than the indicated topic. Please help.

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RedHat AS 3
Web server: Apache 1.x
Perl version: 5.8
Client OS: Windows XP
Web Browser: Mozilla Firefox 1.1
Categories: Missing functionality, Skin

-- JohnStucki - 06 Mar 2005

Answer

I do not think that this is possible with the current implementation since the current topic text is taken if the Web.TopicName matches the current topic. This is for efficiency and to get the correct TOC in preview (before save). There are several renderings per page. One is for the skin/template template text, another one for the topic text, etc.

You could overload the TOC handling in a Plugin (or add code to your DefaultPlugin) so that the TOC handler is always reading from the file to get the current topic text.

-- PeterThoeny - 06 Mar 2005

see also TocOfBaseTopicInIncludedPage

-- WillNorris - 06 Mar 2005

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2005-03-06 - WillNorris
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.