---
title: 'Is it possible to make the sub-directories foldable in the menu?'
url: 'https://getgrav.org/forum/content-markdown/is-it-possible-to-make-the-sub-directories-foldable-in-the-menu-t6098'
markdown: 'https://getgrav.org/forum/content-markdown/is-it-possible-to-make-the-sub-directories-foldable-in-the-menu-t6098.md'
date: '2026-06-21'
description: "Hello, I'm a newbie trying to set up RTFM skeleton, a sample documentation site using the learn2 theme, which really pleases me to set up a Bible reading and"
---

[Content & Markdown](https://getgrav.org/forum/content-markdown)

#  Is it possible to make the sub-directories foldable in the menu? 

  Started by Jan L'Am 2 years ago · 4 replies · 1006 views    

 [2 years ago](https://getgrav.org/forum/content-markdown/is-it-possible-to-make-the-sub-directories-foldable-in-the-menu-t6098#post-39862 "Permalink") 

Hello,
I'm a newbie trying to set up RTFM skeleton, a sample documentation site using the `learn2` theme, which really pleases me to set up a Bible reading and other books.
I've done some research but can't seem to find help for this.
I have Bible folder attached to root, then sub-folders for Old Testament and New Testament. Under each of these are sub-folders to each book. Each Book by chapters containing the texts.
On the left-side menu, I would like the sub-folders to fold/unfold as the folders attached to root. Is there a way to make the subfolders fold/unfold?
Perhaps, I should use a different approach? All suggestions are welcome.
Thank you for your time.
Jan Lam

 [2 years ago](https://getgrav.org/forum/content-markdown/is-it-possible-to-make-the-sub-directories-foldable-in-the-menu-t6098#post-39864 "Permalink") 

@JanLam,

> trying to set up RTFM skeleton, a sample documentation site using the `learn2` theme, which really pleases me
> 
> On the left-side menu, I would like the sub-folders to fold/unfold as the folders attached to root.

If you've already downloaded and installed the RTFM skeleton, you can see the nested folder structure in */user/pages*. This folderstructure is represented als collapsible containers in the demo in the sidebar on the leftside of the site.

> \[..\] attached to root

What do you mean by "root"? *user/pages* perhaps?

Have you studied Grav's documentation on <https://learn.getgrav.org/>? Take a look at this sample folder structure in section [Folders](https://learn.getgrav.org/17/content/content-pages#folders)

Update:
I may have overlooked something. Do you mean collapsing not only the main chapters 1 Basic, 2 Content, etc, but also collapsing their nested children.
If your set variable `top_level_version: true`, is seems you can collapse one level deeper, but not further down. See if that fits your needs.
Maybe you can tweak theme Learn2 (a child of the theme that is), but I haven't looked at it myself.

 👍 1 

last edited 03/06/25 by pamtbaau

 [2 years ago](https://getgrav.org/forum/content-markdown/is-it-possible-to-make-the-sub-directories-foldable-in-the-menu-t6098#post-39867 "Permalink") 

Thank you so much for your reply. Yes, collapsing is the term I should use.
I would like to make the sub-folders collapse like the main top folders, as it would become very difficult to manage the huge amount of chapters that would be all displayed on the side menu.
I'll work on this.

 [2 years ago](https://getgrav.org/forum/content-markdown/is-it-possible-to-make-the-sub-directories-foldable-in-the-menu-t6098#post-39900 "Permalink") 

I accomplished this very thing with the learn2 theme… see here:

www.test.reinavaleragomez.com

The book of Genesis has what you want. I don’t have the other books like that. My structure is like this:

01.Genesis/01.chapter-1/docs.md
01.Genesis/02.chapter-2/docs.md
01.Genesis/03.chapter-3/docs.md

Etc you get the idea. This has them expand in the left hand menu for the book being viewed.

You can also add a tag in the header of the page file:

> visible: true

But I’m not real sure how to get the order specified the way you want it.

 👍 2 

 [2 years ago](https://getgrav.org/forum/content-markdown/is-it-possible-to-make-the-sub-directories-foldable-in-the-menu-t6098#post-39903 "Permalink") 

Thank you for sharing your work. I like the way your texts are set up. Your ideas are a great help.

 👍 1 

[Log in](https://getgrav.org/login?return=%2Fforum%2Fcontent-markdown%2Fis-it-possible-to-make-the-sub-directories-foldable-in-the-menu-t6098) to reply.

###  Suggested topics

 | Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| [Definition lists in Markdown extra not working](https://getgrav.org/forum/content-markdown/definition-lists-in-markdown-extra-not-working-t8696)    [Content & Markdown](https://getgrav.org/forum/content-markdown) · by Jochen, 1 year ago |  | 6 | 1480 | [1 year ago](https://getgrav.org/forum/content-markdown/definition-lists-in-markdown-extra-not-working-t8696 "by Gez") |
| [Theme PinPress: No 'about' on Dutch pages](https://getgrav.org/forum/content-markdown/theme-pinpress-no-about-on-dutch-pages-t5046)    [Content & Markdown](https://getgrav.org/forum/content-markdown) · by Ton Haarmans, 2 years ago |  | 10 | 1136 | [2 years ago](https://getgrav.org/forum/content-markdown/theme-pinpress-no-about-on-dutch-pages-t5046 "by pamtbaau") |
| [Delimiter doing the opposite](https://getgrav.org/forum/content-markdown/delimiter-doing-the-opposite-t757)    [Content & Markdown](https://getgrav.org/forum/content-markdown) · by Leonardo, 2 years ago |  | 3 | 920 | [2 years ago](https://getgrav.org/forum/content-markdown/delimiter-doing-the-opposite-t757 "by Karmalakas") |
| [New Installation - Navigation Menu and Table Styling](https://getgrav.org/forum/content-markdown/new-installation-navigation-menu-and-table-styling-t4181)    [Content & Markdown](https://getgrav.org/forum/content-markdown) · by belthasar, 2 years ago |  | 4 | 1391 | [2 years ago](https://getgrav.org/forum/content-markdown/new-installation-navigation-menu-and-table-styling-t4181 "by belthasar") |
| [Building an Imageslide but with Modules](https://getgrav.org/forum/content-markdown/building-an-imageslide-but-with-modules-t4791)    [Content & Markdown](https://getgrav.org/forum/content-markdown) · by David Schad, 2 years ago |  | 2 | 799 | [2 years ago](https://getgrav.org/forum/content-markdown/building-an-imageslide-but-with-modules-t4791 "by Karmalakas") |
