How do I exclude a folder in dataviewjs inline?

Things I have tried

What I’m trying to do

I’m trying to get a count of pages that have a specific type, like a count of all recipes I have in Obsidian, but I need to exclude my Templates folder.

Here’s the count function that works, but includes the Template:
$=dv.pages().where(b => b.file.frontmatter.type == 'recipe').length;

1 Like


`$=dv.pages('-"your/folder/path"').where(b => b.file.frontmatter.type == 'recipe').length`
1 Like

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