Replies: 1 comment 2 replies
-
Can you look at Metadata Menu? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
During av visit today I had a brilliant idea of adding some inline dataviewjs into the frontmatter of a note, dereferencing some other frontmatter fields, so I went ahead and created the following:
Then I tried testing this, and seeing if it had the wanted effect. Which it didn't. Bummer...
So I extended the note a little with the following segment:
And when I looked at the reading view, I was both disheartened and little hopeful, but alas it still didn't work as expected as the image below shows:
In the reading view, in the middle, it kind of seems like everything should be OK, if you don't look at the Metadata. But when you look at highlighted line in Developer Tools > Elements, you'll see that the actual class that was added to the main div was the literal inline dataviewjs query. Which then again, when inserted into the reading view, actually got executed before the note is showed in the reading view, so it kind of indicates it should work.
So, not really disappointed, but a little sad that I can't execute inline dataviewJS queries in the frontmatter. I can understand it, but it would have been fun if it had worked. I could have had a lot of fun with queries like that. (Even though it would open a rabbit hole in race conditions as to which part got executed first, like would it be setting the CSS class in the main DOM, or would it be the query, and if the query changed would it be able to actually change the DOM, or ... )
PS! I categorised this as "General", because even though I would love to have this as an idea ( or feature request (or bug(?))), I don't think it's really feasible to get this to work. If you'd like to prove me wrong, feel free, as it would be fun (and useful in some cases) to have this kind of functionality.
Beta Was this translation helpful? Give feedback.
All reactions