Closed cordovero closed 2 years ago
Tags in YAML are formatted differently--see here: https://help.obsidian.md/How+to/Working+with+tags#Add+tags Try this:
{% if tags.length > 0 -%}Themes:
{% for t in tags -%}
- {{t.tag | lower | replace(" ", "-")}}{% if not loop.last %}
{% endif %}{% endfor %}{%- endif %}
I think {% if themes %}
is what is giving you the error--try deleting that.
Thank you so much, that worked wonders! I had assumed the tag field in the template would work in the YAML frontmatter... Again, thank you for all your work!
Hello,
I have been really inspired by your Zotero/Obsidian workflow. However, I'm also really terrible at coding... For my workflow, I would really need to be able to add the tags from the Zotero object within the YAML field of the imported annotation. I have tried pasting your tags code within a tag field in the template (in the YAML frontmatter) but I always get a parsing error. I attach a screen cap of the modifications I've attempted within the template, as well as the error message. I'm quite lost! Thank you so much!