wwu-housing / starterbootstrap

Bootstrap based Dokuwiki template.
http://dokuwiki.camlittle.com
40 stars 19 forks source link

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

Open lokarlhorst opened 9 years ago

lokarlhorst commented 9 years ago

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 :)

apexskier commented 9 years ago

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

lokarlhorst commented 9 years ago

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

apexskier commented 9 years ago

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.

apexskier commented 9 years ago

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

lokarlhorst commented 9 years ago

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.

apexskier commented 9 years ago

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

DrLulz commented 9 years ago

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

lokarlhorst commented 9 years ago

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.

apexskier commented 9 years ago

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

apexskier commented 9 years ago

@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.

apexskier commented 9 years ago

@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.

lokarlhorst commented 9 years ago

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

apexskier commented 9 years ago

Great!

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

william-bohannan commented 9 years ago

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