Templater template doesn't work

Things I have tried

Hello everybody!
I am pretty new to obsidian, but I’m diving into more advanced stuff daily now.
The problem at hand is with linking paragraphs automatically.
Here is an example:
I want to link my daily paragraph “Memorandum” with ^memo-link to my weekly, but it does not show up. I would prefer it this way, because it does not copy the “Memorandum” paragraph heading to my weekly then, making it look more clean.
friday, code
Friday, edit

The thing is, IT IS created, and even if I want to click on the “click to create” it shows “file name cannot contain…” common error.

It does not show up even with heading linking.
thursday, code
thursday, edit

What I’m trying to do

So… this idea is done with templater and with all the plugins you need. The idea works well when I just replace the code part with the actual file name (which is the same file name in the end).

double, doesnt
As you can see, it works (kind of), but it needs to be automatic, so if I want to make a weekly note, the notes should come in automatically.

I should also mention that it worked before (kinda) with heading liking, but now it does not for some odd reason. Maybe I broke something, idk, I didn’t really do anything to it, just played around. And yes, I have set it up in templates, created a file with that template, still does not work.

Also it really bothers me, that the block linking is only for text, but not for tasks (shown in the example).

What does the Markdown of the broken links look like? Does it differ from the ones that work?

Block links should work with tasks, too.

No, it does not, you can see from the screenshots (2nd and 5th).

Yes I know that links “should” work with tasks as well, but as you can see, it does not.

I don’t see any Markdown in the 2nd screenshot.

It sounded to me like you thought this was Obsidian’s intended behavior.

Yes, because it does not work, if in the 5th screenshot is shown, it should be the same way as in the second one.
Maybe I’m stupid and don’t understand the question, so we are going around in circles.

If you switch to Source Mode you’ll see the Markdown.

(You might also see it if you found the right place to put the cursor, or select the whole line.)

Okay, the markdown is show on different picutures as well but here they are side by side. The bottom one works because it is just the file name and then the linking, but the top one does not and I do not understand why.

Wait, is this all in the template file? Do the links work in the template output?

It does not work. I’m pretty sure what you mean tho.

So in your template file you have ![[<%+ tp.date.weekday("DD.MM.YYYY.dd", 4) %>#^work-link]], which instead of embedding a file gives you a message about the file not existing. When you trigger that template in another file it produces
![[30.09.2022.Fr#^work-link]], which embeds the file as expected.

Do I understand you correctly?

I’m afraid not xd. I just indicated with

this quote how it should work, because the code in the end should give the same results…
That is what troubles me, the template does not work for some reason, but it should because it is pretty simple…

OK, so when you trigger the template ![[<%+ tp.date.weekday("DD.MM.YYYY.dd", 4) %>#^work-link]], it outputs ![[<%+ tp.date.weekday("DD.MM.YYYY.dd", 4) %>#^work-link]]? Is that what happens?

EDIT: Maybe you just need to change a setting, like this person? Discord

The thing is that Obsidian might be bugged, because at the beginning it worked, then I tried getting the task listing to work. Now it is just all f’ed up.
But yes, I trigger the template and it does not render, it says the classical “click here to create…” error when it tries to render. I have everything turned on and my daily template renders well, so no problems there.
Idk what todo anymore really…

Nobody… anyone? Any ideas what to try etc?

How are you triggering the template? Does it differ from the way you trigger templates that work?

If you can’t figure it out here, you can try asking on the Discord (probably in #plugins-general).

1 Like

Just calling out the template command with command pallet and just selecting the “weekly” template.
I trigger my daily template with daily notes, that is basically the only difference.

Thanks, will try that.

I changed the title from “Block linking does not work” to “Templater template doesn’t work” to reflect the actual problem, and added the “templater” tag.

1 Like

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