Waypoint icon indicating copy to clipboard operation
Waypoint copied to clipboard

[Feature Request] Use %% waypoint %% in template

Open francisHugo opened this issue 1 year ago • 9 comments

waypoint plugin is great, I have been using it for a while.

I also use template plugin in my vault.

Now, I would like to able put %% waypoint %% in a template, so that I could generate a folder notes with file list and some text I wrote in the template.

BR

francisHugo avatar Feb 29 '24 02:02 francisHugo

I have the same problem. What I do is use %% waypoint %_% with a space, so that it doesn't automatically give an error message (about the template file not being a folder note).

Potential solution would be an option to override the automatic error setting, so that you could manually allow the syntax to appear in notes that are not folder notes.

JoelAnderson-UU avatar Mar 15 '24 15:03 JoelAnderson-UU

Responded to a different issue and found a solution that might help.

#https://github.com/SilentVoid13/Templater/discussions/1329#discussioncomment-8944970

Not sure how to link to a discussion, apologies.

offbrands-studio avatar Mar 28 '24 19:03 offbrands-studio

Came across this problem as well. Creating a template file with %% Waypoint %% will result in immediate evaluation, and an error message(waypoint cannot be used in folder notes) replaces the waypoint. My current workaround for this is that I created a folder note for my template folder and put the waypoint command in this folder note. This produces valid waypoint, and whenever I use the template (for example, in Folder Note), the waypoint is then re-evaluated and updated to the correct value. I imagine if you need different templates with waypoint commands in them, then you can create a folder for each of them and put the template in the corresponding folder notes.

Accelsnow avatar May 08 '24 18:05 Accelsnow

If you use Templater, paste to template this code:

<%*
const waypoint = "%% Way" + "point %%";
tR += waypoint;
%>

Works for me :)

manihindrich avatar Jun 18 '24 09:06 manihindrich

Thanks @manihindrich , I will have a try.

francisHugo avatar Jun 22 '24 11:06 francisHugo

it really works! thanks a lot, cheers!

francisHugo avatar Jun 24 '24 15:06 francisHugo

I was happy to help :) so you can close the issue.

manihindrich avatar Jun 25 '24 07:06 manihindrich

Another way to have a template not activate

%% Waypoint %<% tp.file.cursor(1) %>%

If set up this way, it will activate whenever you create a Folder Note without the initial template activating.

You can use Templater to create a Hotkey for Waypoint as well if you want more control.

%% Waypoint %<% tp.file.cursor(1) %>%

  • Create a Template with only this in the body of the note
  • Set up the Hotkey in Templater settings
  • Pick keys to create (I used CTRL CMD W)
  • After creating a Folder Note via Folder Notes Plugin, insert the command via the Hotkey or Command Menu, and you should be good to go.

I hope I've explained this well enough, if not, I'll try to expand if anyone has questions.

offbrands-studio avatar Jun 25 '24 16:06 offbrands-studio

Just use this in template instead:

%% Begin Waypoint %%

%% End Waypoint %%

Works instead %% Waypoint %% and does not give error messages.

Dvornik avatar Sep 03 '24 07:09 Dvornik