-
On iOS, I am using a bookmarklet that I configured to save the URL contents to an inbox folder. Probably due to the fact the Obsidian is opened through Obsidian URI, Templater detects the new file as a newly created (empty?) file with a filename "inbox/filename.md". The bookmarklet-saved file with content gets overwritten with a file (with the same filename) with pre-configured YAML and empty content. Current workaround:
Further examinationActually, as I found out if I create a file in the way I usually do (click on recent files and enter the filename or click on a folder in the File Tree Alternative plugin to create a file in the specified folder), the folder template will still trigger.
QuestionIs there a way to use an exclude under root folder? Or a regular expression? Is this happening to anybody else? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
If you're saying that you have a folder template setup to trigger at the root of your vault ( You can setup a folder template for your nested folder to override the root folder template so the root folder template doesn't execute. Important! In the folder template settings, you'll want to make sure the order of your folder templates is such that the root folder template is below your nested folder template, so the nested folder template runs and prevents the root folder template from running. |
Beta Was this translation helpful? Give feedback.
-
In the end, I managed to solve it. Same folder template, no inbox folder or folder template used. In the bookmarklet, I added a prefix "webclip - " to the filename. I tried using a simple cursor placement method which was not enough. In the end, I decided to delete the prefix as well (the JavaScript snippet must be downloaded from Pamela's Github (see YT video's description), and extra lines must be added to the Meta Templater "master" template for this to work): This template is called when the bookmarklet-generated markdown file is created:
|
Beta Was this translation helpful? Give feedback.
In the end, I managed to solve it. Same folder template, no inbox folder or folder template used.
In the bookmarklet, I added a prefix "webclip - " to the filename.
In the Meta Templater method used, I added the prefix to handle this special case differently, then I used
<% tp.file.content %>
for the template triggered when prefix iswebclip -
, and now the file content stays intact.I tried using a simple cursor placement method which was not enough.
In the end, I decided to delete the prefix as well (the JavaScript snippet must be downloaded from Pamela's Github (see YT video's description), and extra lines must be added to the Meta Templater "master" template for this to work):
This te…