jonasholfeld / kirby3-many-to-many-field

This plugin allows you to create many-to-many relationships between pages in Kirby and synchronizes them on both sides. Latest version also works with Kirby 4!
MIT License
50 stars 1 forks source link

faster lookup #5

Closed bnomei closed 3 years ago

bnomei commented 3 years ago

instead of using $projectPage = page("projects")->children()->findBy("autoid", $project->foreignkey()->value()); a call to $projectPage = $project->foreignkey()->fromAutoID(); should be a bit faster (but maybe less easy to read).

https://github.com/bnomei/kirby3-autoid/blob/5a35e31437d8f7bfbfe8da7ac7e2d66fadbe1a78/index.php#L120

otherwise great plugin!

jonasholfeld commented 3 years ago

yes indeed, Mr. Bnomei! Changed in the Readme.

Thanks for the note and big ups for your great work!