Your forum post is garbled up with various formatting. To properly enclose code within a forum post I suggest surrounding your raw markdown text within four backticks, ````
. This will ensure that both the ordinary text and any potential code blocks will display properly, and that single and double quotes are not messed with.
Back to your question, I’m a little baffled whether your quote template has a frontmatter or not. I’m hoping it is just something like the following:
> [!QUOTE]
> `= this.quote`
> — `= this.author`, `= this.reference`
### Source
<!-- Always keep a link to the source- -->
- `= this.source`, `= this.source-link`
This will when inserted use dataview to pull information from the frontmatter of the note it’s inserted into to present the given quote.
If on the other hand your template also includes the frontmatter, you’ll get into problem if the note you insert the template into already has a frontmatter.
Using the template above with the two frontmatters you provided, they do repeat the quote into the notes. But let me come back to this one at the end…
However, I would strongly suggest that you update your links within the frontmatter to be proper links. That is to write them as "[[My page]]"
which will allow them to be recognised as proper links by Obsidian, and be included in backlinks and so on.
Having multiline quotes within the frontmatter could be slightly tricky, but you could try doing <br >
. Doing quotes should be as easy as using \"
.
Getting back to the frontmatter/template thingy, if this is a template you’re using to record new “quote notes”, where the quote is displayed within that note, you should indeed have the frontmatter before the other parts of the template, but you should also be aware of a caching issue with dataview.
The issue is that sometimes if the query doesn’t change, but the text in the note changes, the query doesn’t update properly. In other words, if you insert the quote template and view it in either live preview or reading mode it doesn’t show anything since there is nothing in the quote
property.
If you then proceed to update the quote
property, it might not display the quote in the section below since dataview has failed to detect the change related to the query: `= this.quote`
.
This could, when I think about your wording in the request, be what you describe as the template only working half the time. To circumvent this caching issue, I’ve found three options:
- Change the query before switching to live preview or reading mode. This could be as simple as adding/removing a space before the last backtick
- Reopen the quote note. I.e. you could go back to the previous note, and then forward using the arrows in the top left of the note window (for the page history of this tab)
- Trigger a rebuilding of the view, which could be done by having a button trigger a javascript doing the command:
await app.workspace.activeLeaf.rebuildView()
I often resort to adding/removing space if I encounter this issue, but you could try reopening the files not working in your case, and see if that fixes the issue.
I did experience this issue when changing the quote to include some quote characters and the <br >
element, so I added a space, and it showed up properly.