Tags:
create new tag
view all tags

SID-01603: Dynamic Left Bar based on contents

Status: Answered Answered TWiki version: 5.1.2 Perl version:
Category: CategoryTemplates Server OS: Last update: 13 years ago

Hello everyone,

I'm quite new to the TWiki concept, we've just installed it and is already accessible on wiki.wine-is.com

We plan to use this platform to provide documentation to our clients and allow them to further improve the quality of the provided documentation.

What we need is that the left side bar to have an automatic table of contents, that is also dynamic and feed in real time.

for example let´s say we have the following strucuture: a web called WineIs, and then a topic named Portal, and another topic named Producers, where the Portal topic is inside the WineIs web and the Producers topic is inside the Portal topic.

Then we would like the side bar to have a menu like this:

- WineIs |- Portal | |- Producers

If at this point we create a topic named Dashboard, child of the Producers topic, the sidebar should immediatly refresh and display:

- WineIs |- Portal | |- Producers | | |- Dashboard

My questions are: - Is it possible to have this concept? To have topics that are childs of other topics? If so how? - Is it possible to change the sidebar automatically to display the structure of the wiki pages? - On another level of complexity, we would like the menu on the sidebar to be collapsed and only show the top level topics of the web, after we click on one it should expand and display it's sub-topics.

Thanks in advance for your insight on this question.

Best regards

Eduardo Poças

-- EduardoPocas - 2012-12-05

Discussion and Answer

On WineIs -> Portal -> Producers -> Dashboard, this is the parent-child breadcrumb. Use a VarPARENTTOPIC.

On sub-topics, it means you want to show the topics that have the parent set to the current topic. You can do that with a %SEARCH that shows all children of the current topic. Untested example:

%SEARCH{ "parent.name='%TOPIC%'" type="query" nonoise="on" format="   * $topic" }%

Details in VarSEARCH, FormattedSearch, QuerySearch.

Good luck with your wine database! I love wine!

-- PeterThoeny - 2012-12-06

Consider creating TWikiForms based apps to organize portals, producers and wines. See blog How to Create a TWiki Application.

-- PeterThoeny - 2012-12-06

      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 Answered
Title Dynamic Left Bar based on contents
SupportCategory CategoryTemplates
TWiki version 5.1.2
Server OS

Web server

Perl version

Browser & version Chrome
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2012-12-06 - 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.