Obsidian-Vault-Structure icon indicating copy to clipboard operation
Obsidian-Vault-Structure copied to clipboard

Templater Update Changes

Open fullstackpotato opened this issue 3 years ago • 4 comments

As others might have noticed, Templater just got updated and broke the way that this is set up (with the blog post).

In order to get the functionality back, you need to do the following:

  1. Enable "Folder Templates"
  2. Set the textbox "Folder" (left-hand input box) to /
  3. Then set the textbox "Template" to 04 - Templates/0400 - Gen_Note.md

image

Hope this helps others, and big thank you for putting this blog post together. It has really helped get my offline notes all organised and usable!

fullstackpotato avatar Oct 10 '21 14:10 fullstackpotato

Are this templates sill working with Templater newer versions? I'm able to config 04 - Templates/0400 - Gen_Note.mdin the way @fullstackpotato indicated, but when I try to create a new blank note I'm having a parse error (without doing any change to the original code):

Error: Template parsing error, aborting. 
 Template syntax error: Invalid or unexpected token

Anybody else?

I was trying to debug from the console but I couldn't find the source of the error, so I think maybe could be related to some syntax change or function deprecated?

Trying to apply this template from the icon in sidebar results in the same error. Applying the struct templates separately works fine.

Anyway, thanks @L1nkd34d for this project :)

r3nt0n avatar Nov 15 '22 15:11 r3nt0n

Are this templates sill working with Templater newer versions? I'm able to config 04 - Templates/0400 - Gen_Note.mdin the way @fullstackpotato indicated, but when I try to create a new blank note I'm having a parse error (without doing any change to the original code):

Error: Template parsing error, aborting. 
 Template syntax error: Invalid or unexpected token

Anybody else?

I was trying to debug from the console but I couldn't find the source of the error, so I think maybe could be related to some syntax change or function deprecated?

Trying to apply this template from the icon in sidebar results in the same error. Applying the struct templates separately works fine.

Anyway, thanks @L1nkd34d for this project :)

Having the same issue here!

ping328 avatar Dec 04 '22 08:12 ping328

@ping328 @r3nt0n Managed to fix this by removing + " \nLast Modified Date: <%+tp.file.last_modified_date(\"MMMM Do YYYY (hh:ss a)\")%>" (the end of that line, excluding the ;) from line 143 in 0400 - Gen_Note.md Not sure why that was causing issues, but this fixed it for me.

Ari-Weinberg avatar Dec 04 '22 18:12 Ari-Weinberg

@Ari-Weinberg I made a similar fix but changed line 143 to:

var timestamps = "\nCreated Date: " + tp.file.creation_date('MMMM Do YYYY (hh:ss a)') + " \nLast Modified Date: " + tp.file.last_modified_date('MMMM Do YYYY (hh:ss a)');

xg5-simon avatar Dec 31 '22 01:12 xg5-simon