Full filename not always an option when trying to modify link display

the issue

When I click on the inside of a link like [[Thor: Love and Thunder]] (which is the alias) I expect to see the fly-out include the full filename so that I can select it, thereby changing the name in the link to [[Thor Love and Thunder - 2022 - shelf 3D 2h]]. But the filename is not an option in some cases. When my link is simply [[Thor]], then it does show up, along with many other titles.

Details if you want them.

For example, here I’m clicking on [[Thor: Love and Thunder]]. You can see that there are only two options and none are the full filename.
image

And this is the result of clicking on just plain [[Thor]], where the option I want is displayed (see the last item):

image

And yet, sometimes it works fine, as in when I click on [[Iron Man 3]] and I get this list with my option 2nd to last:

image

Its pretty difficult to actually understand what you are asking without much context of the exact behavior but,
i think your issue has something to do with where the link explicitly takes you and your specific personal syntax. Assuming your file structure is something like the following, and the link is written like this:

[[root/library/films/2022/Thor/Thor Love and Thunder - 2022 - shelf 3D 2h.avi| Thor: Love and Thunder the actual file]]

---

[[root/library/films/2022/Thor/Thor Love and Thunder - 2022 - shelf 3D 2h.md| Thor: Love and Thunder Notes]]



then, it will display the text intended and send you directly to the file(if it exists). To define a new file, you must explicitly write ‘.md’ (more on this later).

you could also get a bit fancy and provide more syntax and structure like this where the link text provides context and the file names are descriptors of the content

[[links for thor.md|this file]] 

# Links for Thor - 2022 

## Video file:
[[root/library/films/2022/Thor/Thor Love and Thunder - 2022 - shelf 3D 2h.avi| 3D 2hr]]

### Notes on thor:

[[root/library/films/2022/Thor/review.md| My review]]
[[root/library/films/2022/Thor/movies like thor.md| Similar titles]]
root/library/films/2022/Thor/special effects i noticed from thor.md| Special effects that where cool]]
[[root/library/films/2022/Thor/Marvel and Thor universe relations.md| Marvel Universe characters relationships]] 


ex

Links for Thor - 2022

Video file:

[[root/library/films/2022/Thor/Thor Love and Thunder - 2022 - shelf 3D 2h.avi| 3D 2hr]]

Notes on thor:

[[root/library/films/2022/Thor/review.md| My review]]
[[root/library/films/2022/Thor/movies like thor.md| Similar titles]]
[[root/library/films/2022/Thor/special effects i noticed from thor.md| Special effects that where cool]]
[[root/library/films/2022/Thor/Marvel and Thor universe relations.md| Marvel Universe characters relationships]]

although if the files all existed already and they resided in the same parent folder as your note they could just be called like this


[[myfile.md| on first click, create a file named 'myfile.md' in the same directory as this is written]]

ex
[[myfile.md| Create a file named ‘myfile’ in the same directory as this is written]]

If you are pointing to a note that doesn’t exist yet or a specific file, you have to include the explicit file name ex (.md, .avi, .js) because otherwise it will make the link as if you are in that root ‘Thor’ folder like this which will fail to be a valid link for anything as there’s no implied meaning.

[[Thor]]
[[myfile]]

ex

[[Thor]]

[[myfile]]

i think links are more intended to be used to link notes like this:

>>[!your-top-level-folder]  
>> > [!example] file 'a' or explicitly named 'a content' linked to 'b'
>> > [[b content.md|a link in 'b content' in 'a content']]
>> 
>> >[!example] file 'b' explicitly named 'b content' linked to 'a'
>> > [[a content.md|a link to 'a content' in 'b content']]

ex

[!your-top-level-folder]

[!example] file ‘a’ or explicitly named ‘a content’ linked to ‘b’
[[b content.md|a link in ‘b content’ in ‘a content’]]

[!example] file ‘b’ explicitly named ‘b content’ linked to ‘a’
[[a content.md|a link to ‘a content’ in ‘b content’]]

The alias is important for your personal context to the link itself but they are of no value in finding something as the explicit name of a file is the main data that is linked to.

If you want your link to say ‘Iron Man 3’ as the alias you will need to write it like this:


[[root/library/films/2012/Iron Man 3/iron man 3 example 3d blueray.avi| Iron man 3]]


ex [[root/library/films/2012/Iron Man 3/iron man 3 example 3d blueray.avi| Iron man 3]]

the link will always explicitly takes you to the file it points to; if the link is written like this:

[[root/library/films/2012/Thor/Thor Love and Thunder - 2022 - shelf 3D 2h.avi| Thor: Love and Thunder]]

then it will display the simplified alias text and send you directly to the link if the file exists

it also has to do with where the link is;
if im clicking a link in a note with the file

name of:
‘root/library/films/2012/iron man 3/iron man 3 Notes.md’
in:
‘root/library/films/2012/iron man 3/’
for:
‘root/library/films/2012/iron man 3/iron man 3.md’

when the name(alias) of the link is the same name as the file(.md), A valid link could just lead directly to ‘Iron Man 3’ as both the alias and file location like this:


[[Iron Man 3]]
creates Iron Man 3 link
or
[[Iron Man 3.md]] 
creates a link that will create a file in this notes parent folder if none exists


even though the location of the note you are clicking is
actually inside:
‘root/library/films/2012/iron man 3/’

Your settings may vary so its useful to play around with things im pretty sure i have it setup right now is such a way that orphaned links i create will actually write a note when clicked no matter what and new notes get created in the current folder this took me a while and it might be a bit redundant but i hope this helps

Thanks for the reply. I’m sorry if I wasn’t clear.
My situation is simpler than you imagine.
My three examples are all in the same folder: Films.
Filenames:
Film/Films/Thor Love and Thunder - 2022 - shelf 3D 2h"
Film/Films/Iron Man 3 - 2012 - shelf 3D bluray 2h10"

Each has an alias that is the film name only, ie. “Thor: Love and Thunder” and “Iron Man 3”.

As far as I know, links can either point to the filename or the alias (which is the whole point of the alias). So theoretically, when a link points to the alias, I should be able to have it point to the filename and vice versa.

That is my issue. Sometimes the links present the filename as an option, sometimes they do not.

To be clear, I am NOT referring to the option I have of adding whatever I want as a link title, as per [[filename | here I can write what I want]]. That isn’t the issue here.

The issue is seeing a link in a file like [[Iron Man 3]] (which I know is an alias because my files include year, format, location, duration), and not being able to click inside the link and auto change it to display the filename. When you click inside a link you get a fly-out with options and sometimes the filename isn’t listed, and I think it is supposed to be.

I guess I’m just wondering if it’s a bug…

the way it’s working for me at least it seems is that the ‘alias’ is the ‘file name’ -‘.md’

If I search for a specific file name in the link browser it will show up as [[the file name]] and works as a valid link
or if i drag a file to a note it will create the link in the same way with a verbatim link

if i make a link to a completely fictional file and or folder (like this ‘[[root/fictional/folder/file.md]]’)and click it, it creates the fictional folder and file in my root folder.

‘[[fictional file]]’ however creates a new note in the current notes parent directory

note that i also use folder notes and other plugins so your functionality may vary

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