Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
francisHugo opened this issue Feb 29, 2024 · 9 comments
Open

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

francisHugo opened this issue Feb 29, 2024 · 9 comments

Comments

@francisHugo
Copy link

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

@JoelAnderson-UU
Copy link

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.

@offbrands-studio
Copy link

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

#SilentVoid13/Templater#1329 (reply in thread)

Not sure how to link to a discussion, apologies.

@Accelsnow
Copy link

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.

@manihindrich
Copy link

If you use Templater, paste to template this code:

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

Works for me :)

@francisHugo
Copy link
Author

Thanks @manihindrich , I will have a try.

@francisHugo
Copy link
Author

it really works! thanks a lot, cheers!

@manihindrich
Copy link

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

@offbrands-studio
Copy link

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.

@Dvornik
Copy link

Dvornik commented Sep 3, 2024

Just use this in template instead:

%% Begin Waypoint %%

%% End Waypoint %%

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants