Using heading links as property values don't account for the heading's tree path

Steps to reproduce

  • Create a note with two or more H1 with different titles and the same set of H2 in each of them. Example:
# Dice-rolling
## Bad
## Good
## Excellent
# Tile-placement
## Bad
## Good
## Excellent
# Card-drafting
## Bad
## Good
## Excellent

Now create another note with a list-type YAML property. Try adding heading links to the H2 of the previous note, something like:

- game-mechanics:
    - [[Dice-rolling#Good]]
    - [[Card-drafting#Good]]

Did you follow the troubleshooting guide?

Yes

Expected result

The link in the property would point me to each H2, “Good”, in the different H1 they are nested, “Dice-rolling” and “Card-drafting”.

Actual result

Obsidian links to the first occurrence of an H2 titled “Good”, without accounting for the H1 nesting.

Environment


Additional information

As you might have noticed, what I want to accomplish is to organize notes of different boardgames according to the different game-mechanics they feature. There is a wide plethora of boardgame mechanics and most games feature more than one, so using properties seemed like a good option.

The thing is, I don’t want to just point out which mechanics each game has (a list-type property would do for that). But I also want to evaluate how good I think is the implementation of each mechanic. So “Game-A” may feature the dice-rolling mechanic, same as “Game-B”, but I think Game-A does it excellent, while Game-B does it poorly.

As you can see, I’m trying to use heading-links as property values for this. But if there is any other way Obsidian can help me doing this that I have not yet thought of, please advise me. Thanks.

When linking to a heading, you can link to specific subheadings if you have multiple headings with the same text.

In your example, if you wanted to link to the Dice-rolling > Good and Card-drafting > Good headings, you would do something like this

- game-mechanics:
    - "[[NoteName#Dice-rolling#Good]]"
    - "[[NoteName#Card-drafting#Good]]"

Note that I have multiple # in the link, to denote the path to the specific Good heading.

Please try messing a bit with using subheading links as property values. It is unsusable as it is now, specially when subheadings can have the same name. When you type directly into the YAML in the note, it doesn’t show properly as property in the right pane. If you try to type in the property pane, it will autofill with a different subheading then what you’re trying to link.

It appeared to work just fine for me, see attached GIF

tmp_f42934e6-4786-43f7-afde-c9ff72e58f56