Order of Templater Modal-Suggestions has changed

What I’m trying to do

Since I’ve updated to the newest version of Templater (2.4.2), the order of the templates in the template modal has changed.

  • The new sorting algorithm looks at the full filepath as a whole and puts first wherever the search-key appears first, i.e. at a higher order in the folder structure.
  • The old sorting algorithm did the same BUT, id preferred the filename over the filepath.

Why is this a problem?

  1. The ordering differs from standard Obsidian (e.g. for opening a file)
  2. The change forces everybody to update muscle-memory obtained over years of inserting templates which easily leads to errors.
  3. The old algorithm has some important advantages, see the example below

Example: Before the update, when I typed “3” the template Snippets/Block Elements/H3 appeared on top, i.e. before all the templates nested inside 03_/.../.... Now I have to type H3 to get it right… While this is still feasible, if H3 was also appearing in one of the folder-names the H3-template would hardly be accessible anymore… unless…

  • … you move H3.md to the top level in the folder structure – which isn’t an option if this needs to be done with dozens of files.
  • … you cycle backwards through the search results – which isn’t an option if there are files named H3-foo.md, H3-bar.md etc.

Question

Is there a way to influence the search order? A simple switch to move back to the old sorting algorithm would be enough!

Things I have tried

  • I checked all settings in Templater
  • I searched for a changelog but did not find it (is there one?)

EDIT

Reformulated the whole question and changed the example.

That change was introduced with Templater 2.4.0 (changelog) :innocent: … or 2.4.1 (changelog).
(I’m really not sure which one :see_no_evil: )

Sadly, as that modal is managed by Templater, all I can do is suggesting you to open a feature request directly on Templater’s GitHub repo (and/or, in the meantime, maybe try to revert to a previous version of Templater :woman_shrugging: )

Thank you @Pch , I’ll open a feature request.

As a quickfix, and thanks to the changelog you shared, I was able to manually revert the changes in the main.js file.

1 Like

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