How to create collapsible header

On my home page I have four columns, each with a header and links to dozens of folders below each header. How do I make the headers collapsible so that the folders are usually hidden and become visible only when clicking on the header?

I realize that this is a very elementary question, but I would be grateful if someone could point me in the right direction.

Headings are collapsible by default. There is an arrow at the start of each one (invisible until you hover over it or touch it) that lets you do it. There are also commands (they use the word “fold”, not “collapse”).

If that doesn’t work, and Settings > Editor > Fold Heading is enabled, your columns may be interfering. In that case you’ll need to explain how you’re creating the columns, since that requires CSS and/or a plugin.

It turns out that the column headers aren’t standard headers. I don’t remember how I created the columns, but the column headers take the form “- ColumnHeader.” Perhaps I need to redo them. What would be the best way to create columns with folding headers?

If you copy a note, paste it here, trim it down to a minimal example that shows the column stuff, and mark it as a code block (same way you would in Obsidian: https://help.obsidian.md/syntax#Code), we can hopefully see what you’re working with and how to make it do what you want.

I hope this is what you mean:

## Taishƍ Volumes
- Volume 18
[[848]]
[[849]]
[[850]]
[[851]]

I would like “Volume 18” to behave as a folding column header.

What if you try making the links into a list too, but indented? Like this:

## Taishƍ Volumes
- Volume 18
   - [[848]]
   - [[849]]
   - [[850]]
   - [[851]]

That way, I think you’ll be able to fold anything under “Volume 18”

1 Like

If there isn’t other stuff in the note that’s needed to make a column, then yes. Could you look at your lists of enabled plugins and CSS snippets to see what makes this into a column? If it’s a snippet, you can post it here as code like you did with the note contents.

Wolfchiru’s suggestion is a good one. It will not only enable folding, it will make the note render in a more expected way if you ever export it to another format.

Another option would be to change - Volume 18 to ### Volume 18 to make it a heading (unless that interferes with how your columns work.

Thanks. That works in source mode but doesn’t seem to work in reading view.

I created the columns some time ago, but I can’t figure out how I did it since I seem to have no relevant CSS snippet or plugin. Changing - Volume 18 to ### Volume 18 interferes with how the columns work, but I may have to accept that and forget about columns.

However, when I change the headings to ### Volume 18, etc., on the homepage and publish the changes on my Obsidian Publish site, the headings don’t fold. Presumably I need to add something to the publish.css, or is this a limitation of Obsidian Publish?

OK, I discovered the CSS snippet that I used to create the columns (which I copied from somewhere).

# Family
- 🏈 Sunday Game
	- [[Spicy-Sweet Buffalo Popcorn]]
	- [[Guest list]]
	- [Jalapeno Popper Wantons](https://www.allrecipes.com/recipe/166991/jalapeno-popper-wontons/)
- đŸ‘šâ€đŸ‘©â€đŸ‘Š Objectives
	- [[Family Recipes]]
	- [[Family Calendar]]
	- [[Education Plan]]
	- [[Yearly Budget]]
- 🌅 Exotic Vacations 
	- [[Peru]]
	- [[Austria]]
	- [[Texas]]  
- đŸŽ„ Movies to Watch
	- [Sleepless in Seattle](https://www.imdb.com/title/tt0108160/)
	- [Joe vs the Volcano](https://www.imdb.com/title/tt0099892/)

 # Personal Projects
- 🏡 Remodeling Projects
	- [[Bathroom Remodel]]
	- [[Paint entryway]]
	- [[Research building Garage]] 
 - ✍ Writing Projects
	- [[5 ways to love PKM more]]
	- Read: [Obisidian core principles](https://tfthacker.medium.com/obsidian-understanding-its-core-design-principles-7f3fafbd6e36)
- 📚 Learning
	- [[Early American History]]
	- [[Spanish - Entry Level]]

That’s TfTHacker’s Dashboard++ sample Markdown that goes with one or two .css files to create the columns:

※ Keep in mind the column layout only works in Reading view.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.