Generating callouts from dataviewJS #1997
Unanswered
themcclure
asked this question in
Q&A
Replies: 2 comments 2 replies
-
OK, in digging in deep for this post, I think I have found a hint. |
Beta Was this translation helpful? Give feedback.
1 reply
-
This works:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi folks, I want to have a section at the top of a project note that will go through and collect all the incomplete tasks that preference the project. Which I did with dataview (yay).
I then wrapped the query in a callout to make it collapsed by default (because sometimes there are a lot of tasks).
However for the "best life" version of this, I want the callout to be collapsed, AND have the title show how many tasks are in the callout.
I can generate the callout just fine but the problem I'm having is the generated callout ignores the
-
modifier, and outputs an expanded, non-collapsible callout.The key line of code is:
dv.paragraph("> [!info]- Incomplete tasks ("+tasks.length))
Is there another dv function I should be using to generate the callout? I can't find anything in the docs, fora, or google.
Or is this possibly a bug with callouts?
I manually create the callout and opened up the developer tools and it looks like all the css classes are the same in both with the
collapsible class definitely present:
<div data-callout-metadata="" data-callout-fold="-" data-callout="todo" class="callout is-collapsible">
Thanks
Beta Was this translation helpful? Give feedback.
All reactions