Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Add "ignore note" option in Hierarchy notes #207

Closed
veradrawer opened this issue Dec 7, 2021 · 8 comments
Closed

FR: Add "ignore note" option in Hierarchy notes #207

veradrawer opened this issue Dec 7, 2021 · 8 comments
Labels
builder:list-note List Notes (previously "Hierarchy Notes") FR New feature or request

Comments

@veradrawer
Copy link

With the addition of Hierarchy notes I'm missing the chance of specifying files ot be ignored. Case in point: templates.

imagen

I'd love to be able to hide these, as any modification withing the template would affect any rendered file, the hierarchy notes are perfect for this.

@SkepticMystic
Copy link
Owner

I don't fully understand...
So do you have a Hierarchy Note Template?
And the templates in that note are being added to your Breadcrumbs?

@veradrawer
Copy link
Author

My bad. This is not my first language and it shows. I'm using templates to render new notes, and these templates are being listed in the matrix view as well.

I can't find a way of hiding trem without modifying the template, which requires to later manually modify every new note.
I'm asking whener it would be possible to list in a Hierarchy Note certain notes that should be ignored by the system.

@SkepticMystic
Copy link
Owner

I've added a fix for this, but it may not be what you meant.
Can you send an example of a note where this happens?

@SkepticMystic SkepticMystic added FR New feature or request builder:list-note List Notes (previously "Hierarchy Notes") labels Dec 16, 2021
@veradrawer
Copy link
Author

veradrawer commented Dec 16, 2021 via email

@SkepticMystic
Copy link
Owner

@veradrawer hahaha ok, I think I understand better...
Can you send an example of a template that causes this problem

@veradrawer
Copy link
Author

Sure, daily notes are a prime example:

imagen

Which are rendered with:

---
modified: 
created: "<% tp.date.now("YYYY-MM-DD HH:mm") %>"
title: "<% tp.file.title %> - "
aliases: 
notetype: [["_fleeting"]]
noteclass:
- [["_daily"]]
- [["_event"]]
day: [["<% tp.date.now("YYYY-MM-DD") %>"]]
month: [["<% tp.date.now("YYYY-MM-MMM") %>"]]
quarter: [["<% tp.date.now("YYYY-[Q]Q") %>"]]
year: [["<% tp.date.now("YYYY") %>"]]
related: 
parent: [["_daily"]]
next: [["<% tp.date.now("YYYY-MM-DD", 1) %>"]]
prev: [["<% tp.date.now("YYYY-MM-DD", -1) %>"]]
tags: 
---

This also happens, for example, with Literary notes:

imagen

Rendered from:

---
modified: 
created: "{{date:YYYY-MM-DD}} {{time:HH:mm}}"
title: "{{title}}"
aliases: "{{citekey}}"
citekey: "{{citekey}}"
notetype: [["_literature"]]
noteclass:
- [["_zotero"]]
author: {{authorString}}
publisher: [["{{publisher}}"]]
collection: 
lang: 
year: [["{{year}}"]]
quarter: 
period: 
docType: 
mediaformat: 
- [["_analogical"]]
- [["_digital"]]
url: "{{URL}}"
related: 
parent: [["_references"]]
tags: 
---

@SkepticMystic
Copy link
Owner

@veradrawer I've been thinking about this, and to tell Breadcrumbs to ignore a field, I see the following options:

  1. Put something in the key of the field: !parent:: [[note]]. This has the issue that now it's a different field, you know? Dataview and Obsidian see that as completely different from parent.
  2. Put something in the value of the field: parent: ! [[Note]]. But this won't work without a big refactoring, because the current system just grabs all wikilinks inside the fields you specify in your hierarchies.
  3. Put something inside the wikilink: parent:: [[!Note]]. This has the issue that Breadcrumbs has to do extra parsing of every breadcrumb in the vault. And there might be edge cases where a link has the ignore character ! but you still want it to be included.

So, the way I see it, no matter what, you're gonna have to add an ignore character somewhere. So my suggestion is to add a backslash before the field key, making Breadcrumbs think it's a different field entirely \parent:: [[Note]], and therefore will ignore it. It requires you to manually remove it after inserting the template, but I don't see a better way right now.
What are your thoughts on this?

@SkepticMystic
Copy link
Owner

I believe #306 closes this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builder:list-note List Notes (previously "Hierarchy Notes") FR New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants