Templater: Show Only Title for a Page Created in a Specific Folder

Things I have tried

I have a hotkey like this:

[[folder/<% tp.file.cursor()]]

What I’m trying to do

which works fine, but what I want to have is something of that kind:

[[folder/<% tp.file.cursor() | “title of the note i’m creating with this hotkey” ]]

is that even possible?

Could you clarify a little further: Which part of your process is actually creating the file? Or does the file already exist when you are writing the link to it with your hotkey?

I have a Hotkey e.g. CNTRL+H to create said line: [[folder/<% tp.file.cursor()%>]]

Then I type out where my cursor is e.g [[folder/file-name]] which reates the file (didn’t exist before)

But now in the document it says e.g. Lorem folder/file-name ipsum

But what I want is just Lorem file-name ipsum

(Hope that made it clear?)

Thank you, yes that does make it clear! My setup does not automatically create files when I link to them, so I I can’t test this, but do you get any auto-completion suggestions if you type the | after the file name? Or do you get any if you wait a couple seconds to type | after making the file? Depending on how your new files are automatically created, you could try adding an alias in the YAML frontmatter and see if that shows up as an autocomplete suggestion after you type the |. I do expect it will take a couple seconds after file creation for Obsidian to get the alias into its auto-completion suggestion pool.