Display the header only if there are notes with some tag (dataviewjs)

Things I have tried

Please help me with plugin dataviewJS.

There are notes with a tag = #tag.

I can use this inline code:

Number of notes with tag: $= dv.pages("#tag").length

I need to display the header only if there are notes with this tag.

Something like this:


$= dv.pages("#tag").length > 0


dv.header(6, ‘tag’);

I don’t get exactly what you want to achieve - which header do (or don’t) you want to display where?

This header in code dataviewjs will always be displayed:

dv.header(6, 'tag');

I need add some code to hide header if there are NO notes with this tag.

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