Tags:
create new tag
view all tags

SID-01609: HowTo Display TOC in WebLeftBar with NumberedHeadings

Status: Unanswered Unanswered TWiki version: 4.0.0 Perl version: ?
Category: TocPlugin Server OS: ? Last update: 13 years ago

Dear Supporters,

if i asked this question in the wrong support category, please feel free to gibe me a notice.

I am working with TWiki 4.0. I can not upgrade to a newer version as the IT dep. of the company refuses to do so... . As well I can not manipulate the tmpl, can not install additional plugins like GlobalSearchAndReplace and so on.. . wink Of course the IT dep. arguments with security issues if new plugins or new TWiki versions or additional TWiki rights for me would be used...so far I can not change the way IT admins think.

Now my situation:

I am using NumberedHeadings to number the headings. As a workaround for HeadingOffsets in includes I use a TWiki Variable - %TO% - with the NumberedHeading. In the include, I use a TWiki Variable %OS% to set the offset.

The heading then looks like this: <verbatim>

%TO% Heading 1

</verbatim>

The include then looks like this: <verbatim> Warning: Can't find topic Support.SomeTopic </verbatim>

I did some magic to identify if the topic is included or not and to:

  • set the %TO% variable to empty if not included
  • set the %TO% variable to the value of the %OS% variable if included
This works for includes so far as the heading is offseted if a topic is included - of course, if this topic includes itself another topic, this other topic is not offseted... .

My problem:

I'd like to display the TOC of the topics in the WebLeftBar with skin=pattern. What I tried to do:

- this displays a bullet-styled TOC with the Variable %TO% not evaluated. So far it does not work, because it seems that the %TO% Variable is not evaluated while the WebLeftBar is displayed. If I use TOC in the topic-code itself it is all displayed nice and working.

My Workaround:

I defined an INCLUDE that I include in any topic, called ShowWebLeftBar. Within that, I define some divs that are displayed via css in the WebLeftBar area of the page. This seems a bit dirty, but this is my current workaround.

I'm working with about 1000 topics - i changed (by hand!) about 100 of them.

Is there any nice solution to display the TOC in the WebLeftBar after the variables of the topic are evaluated?

Thanks in advance for any answer.

Best regards,

Norbert

-- NorbertBraun - 2012-12-13

Discussion and Answer

Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the TWiki consultants if you need timely help. We invite you to get involved with the community, it is more likely you get community support if you support the open source project!

-- Peter Thoeny - 2013-03-05

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Unanswered
Title HowTo Display TOC in WebLeftBar with NumberedHeadings
SupportCategory TocPlugin
TWiki version 4.0.0
Server OS ?
Web server ?
Perl version ?
Browser & version Firefox and IE
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2013-03-05 - PeterThoeny
 
  • 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.