wwu-housing/starterbootstrap

Sidebar TOC generated from sidebar.php. How to use it?

Opened this issue · 14 comments

I can't figure out how to use the sidebar.php features in my Dokuwiki installation. Does it generate a dynamic sidebar with all available .txt files and subfolders? How du i have to use it with this theme?

Thanks a lot for your answer :)

See issue #11. If you're wondering about dokuwiki's TOC feature, see https://www.dokuwiki.org/toc.

But isn't there a solution in the theme to add an automatic generated menu at the sidebar with the wiki contents inside?

From your Readme:

Built in wiki structure (navigation) sidebar

My phrasing isn't great there. I'm referring to the visual style of the sidebar being generated. However, I do have some functionality for auto generating the content of the sidebar. I'll see if it's easy to port to the sidebar.

Okay, no caching has been implemented, so it's slow for big wiki's, but try using "automatic" in your sidebar configuration.

Great solution and big thanks. A nice to have, if possible, is the ability to add custom entries at the bottom of the automatically generated sidebar.

Okay, I'll add that into my list of possible future enhancements.

This is really great. How could I make the "automatic" sidebar be sticky when scrolling down, so I can always see it?

Can you also include a solution to let the sidebar stay open when i've choosen an article? That will be a nice add on.

@DrLulz You'll need to use the bootstrap affix javascript functionality. See #36.

@Sotsy Keeping the section you're currently viewing in the sidebar open could be possible through modification of the generation code.

However, due to the fact that the pages aren't generated, you can't guarantee a page within one section of the sidebar menu is directly related to that section, or that it doesn't appear in another section. The logic would be such that I can't determine which section should be open given the current page.

@Sotsy But, if you're using the auto generated sidebar, you'd need to keep track of the current page, and mark each heading that represents a namespace above your current page as open in that generation code.

I've realized a caching and automatic open solution for auto generated sidebar. I will make a pull request, so you can use it for your template

Great!

Can you try to make new issues/PR's when you have a new topic?

Is it possible to have the sidebar work with the indexmenu plugin so it auto generates a menu of the wiki?