Can links create new notes of the same names in a new folder?

Hi there,

Each new project in my business has the same departments, therefore I created a template with a dashboard that contains links to all these departments. The notes don’t exist yet, which is exactly what I need: when I click on a link, a new blank note is created for that department.

THE PROBLEM

The problem arises when I start another project with another dashboard: now the links don’t create new blank notes anymore, they open the existing ones from the previous project, since they have the same name (even though they’re in another folder).

WHAT I’M TRYING TO DO

I need each new project dashboard to create new notes for that specific project in the corresponding project folder, and NOT link to the existing ones which are in the other project folder. Is there a way to do this? Many thanks.

Would anyone have any idea about this, or maybe know how to work with several projects that each contain notes with identical names? At the moment the only workaround I’ve found is to add the project name before the department:

PROJECT 1 - DEPARTMENT 1
PROJECT 1 - DEPARTMENT 2

PROJECT 2 - DEPARTMENT 1
PROJECT 2 - DEPARTMENT 2

Etc., therefore creating a unique note name for each note. Problem is that I have many notes with similar names. Do you guys always avoid duplicate note names when working in Obsidian?

I tend to try to keep unique names all over the vault, but that’s a personal preference. You can have files with the same name, but to distinguish them from each other, you’d typically add which folder they belong to, like in the following image (with source mode on the left, and reading view on the right):

The names could of course be changed visually, so you don’t see the actual folders by doing something like: [[ForumStuff/f48291/SameName|SameName]]. Like shown in the third row in the image.

Thanks so much! That solves everything. I’ll use

[[Project/Department 1|Department 1]]
[[Project/Department 2|Department 2]]

After inserting my dashboard template, I’ll just do a search & replace to replace “Project” by the actual project name. This solution is even better because when I click on a link it not only creates the note but also the folder for the new project. Many thanks.

When creating a new link that includes a folder, would there be a plugin that automatically add the “|file name” at the end, in order to hide the folder name?

I don’t know of any plugins doing that, but maybe you could utilise the aliases: field in the frontmatter, and just add Department 1 into it. That would require your template to do that for you.

Depending on your template, couldn’t that create the folder for you directly? I mean, so that you wouldn’t need to do the search&replace? If you use Templater it should be able to produce the correct link in the first place if it knows the project name.

Thank you. I’m not fully familiar with frontmatter or Templater yet, I’m gonna look into it.

For the dashboard, it’s really quick to replace the project name in all of my links at the start of a new project.

But if later on I need to link to a note that is located in a sub-folder, I’d like obsidian to automatically hide folder names. Let’s say I’m in a note and want to link to “Department 1”. Obsidian suggests “Project 1/Department 1” and displays it as the link. Is there a way to tell Obsidian to show just the file name by default, and not the entire filepath?

Yes, in my example I added the following to the start of both of my SameName notes:

---
aliases: SameName
---

When I now type [[Same it’ll list the autocompletion shown below:

image

In this test vault I’ve only got two notes named SameName, but you can see it lists all four variants. The one with the aliases have the arrow on the left, like in the selected alternatives. So using aliases, you can select the correct one based on the folder name, and it’ll show as just “SameName” (or whatever else you specify in the aliases field).

Many thanks, it works fine now. However that’s indeed a few extra steps just to make links look pretty, and I think it may be simpler to just display the full file path in links, and only use aliases for specific cases such as the project dashboard. Many thanks for your help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.