Hide meta-bind-buttons dynamically

What I’m trying to do

To keep my Daily Note visually clean, I want to hide/un-hide some meta-bind-buttons depending on a CSS class or a property.

Things I have tried

AI, meta-bind help files, Dataview, HTML wrappers, and similar approaches.


I’m honestly getting desperate, because I spent the entire day yesterday trying (without success) to achieve the following:

In my Daily Note, I have a kind of “dashboard” made up of meta-bind-buttons, which I generate through my daily note template and use constantly (jump to yesterday, jump to tomorrow, etc.).

Now I’ve added an additional set of meta-bind-buttons that are linked to templates I use only occasionally. To keep my Daily Note visually clean, I want to hide these buttons and show or hide them depending on a CSS class or a property.

The relevant line looks like this:

BUTTON[template1, template2, template3]

The problem is: everything I’ve tried so far—also with the help of AI tools like ChatGPT, Gemini, and Copilot—either doesn’t work or results in errors like [META_BIND_ERROR].

The only thing I’ve managed to get working so far was a solution using a callout, but I don’t want to use that for visual reasons.

AI has suggested various approaches, but all of them still lead to [Meta_Bind_Error].

I’ve also tried Dataview, HTML wrappers, and similar approaches.

I just can’t get it to work!

It really feels like there must be a way to either show or hide a single line of code that generates one or more buttons.

And I would be extremely grateful for any help that finally gets me past this issue.

Have you tried adding a css class to individual buttons?

Once the button/buttons have a class, per-note styling can be applied by using css and the cssclasses Property.

Something to investigate.

Yes, that actually solved my problem. I created a button that uses a small JavaScript script to toggle my cssclasses property in YAML. Then I linked the buttons that needed to be hidden to a specific class, for which I defined a CSS snippet to control whether they appear or not.

So thank you VERY much for pointing me in the right direction!