Backlink in document (core plugin): turn off this setting for specific notes

  • problem: some note types don’t need backlinks displayed in the document. Particularly notes on the side panel, but at other times I want this feature too.
  • desired outcome: In the core plugin backlinks settings, there should be an exclude notes option.
    • Notes could be excluded by #tag by folder path, by YAML metadata (default show-backlinks: false or custom specific-note-type: no-backlinks).

thanks

  • a note in the sidepanel, where I wouldn’t want to see back links. usually I have a link to today’s daily note here, and I never want backlinks shown.
4 Likes

Had to use css snippet for a workaround on this.

/* disable embedded backlinks for sidebar */
.workspace-split.mod-left-split .embedded-backlinks,
.workspace-split.mod-right-split .embedded-backlinks{
	display:  none;
}

Also few more extra goodies: Minor css snippet tweaks for Obsidian Minimal theme · GitHub

Use case or problem

For some notes I always want to see backlinks. For other notes, they are irrelevant. Especially on mobile, having to swipe for backlinks is a pain (pun!).

If I could “toggle backlinks in document” per note, then I could set it per note and forget it.

Current workaround

Dataview

2 Likes

Related:

+1
For atomic notes, backlinks in document is great. But for navigational (dashboards and mocs) notes, it’s too much.
To not to toggle on/off frequently, I use side pane but I’d rather backlinks in document because it’s larger and better.
Combined with retaining the display options for backlinks per note, it would be much better experience.

Related:

1 Like

Is it possible to use some snippet
to enable showing backlinks in the note bottom only for certain notes? (Or any other way to do that?)

So if the note has appropriate cssclasses property in the frontmatter, then show backlinks in the bottom. And for the all other notes don’t show.

Could you help to construct such snippet?

This should do it:

/* 
Enable backlinks in note only for notes with a special class. 
https://forum.obsidian.md/t/backlink-in-document-core-plugin-turn-off-this-setting-for-specific-notes/42137/8?u=cawlinteffid
*/

.embedded-backlinks {
	display: none;
}
.show-backlinks .embedded-backlinks {
	display: unset;
}

A cssclasses property of show-backlinks will enable backlinks in that note.

1 Like

Thanks a lot, it works perfectly!

By the way, in addition you need to turn on toggler “Show backlinks at the bottom of note” in core Backlinks plugin.

Yes, without that turned on there is nothing for the snippet to hide and show.

How to make those backlinks in the bottom be folded by default?

Click or tap the first icon (the one that looks like a list) to fold all backlinks. After that I believe Obsidian will remember the setting until you in-toggle it.

Doesn’t work, unfortunately (at least on Android).