I’ve set the Files & Links, New link format to “Shortest path when possible.”
I turned off community plug-ins by going to restricted mode.
What I’m trying to do
I make a folder for each project, and many of the files in each project folder have the same name (Goals, Research, etc.) I also have a Dashboard file in each folder, which links to that folder’s Goals and Research files.
Unfortunately, those links are displaying with the full path, such as: Art/Projects, active/Project1/Goals
I assume the path is sometimes displayed to differentiate the link from files with the same name in other folders, but this isn’t helpful in my case.
Is there a way to stop displaying the path in links?
If you provide aliases in the link, you won’t see the internal links.
If I understand your use case correctly you provide templates for the various files, so I would suggest that you add the aliases in the frontmatter. When you then try to link with the alias you’ll see the full path in the auto-completion, but I’ll show just the alias in the reading view.
Thanks. That seems workable, but it’s a bit of an unfortunate hack.
Is Obsidian really supposed to display the full path whenever you add a link to a file that has the same name, but is in another folder? I can see how that might help when you’re linking on the same page to like-named files in different folders, but that would seem a rare event.
If this is really how Obsidian is supposed to work, do you know of a way to toggle OFF full path display in links?
It really makes it harder to scan a list of links when the actual filename is at the far right of each link:
Yes, that’s exactly how it works. Links are based on names. They don’t have any sort of special connection to each other. You can edit the files outside of Obsidian and as long as you make links that match notes, when you open Obsidian the link will exist.
If the name isn’t unique, it needs to use the folder as a distinguishing name-space, otherwise it wouldn’t know which note to address. Thus, “when possible”
@holroy Obsidian has always supported folders since the beginning. And you are certainly free to have notes with the same name. This is just how they resolve that clash.
I’m just replying with that context. I don’t know a way to hide that with CSS. Personally, I’d revisit the design of my folder structure. (But these are just personal suggestions; totally up to you of course!)
You could consider making it less deep, and using tags instead of folders like “active” for example.
You could keep a template note that has headings with all the things like “Goals” in one note.
You could prepend each project note with a project id number “072 - Goals”
You could switch the order of your folders hierarchically, from Art/Projects to Projects/Art, so that the larger domain is at the front, and maybe some of your paths will end up shorter.