Get a blueprint based on template

Hello. I want to get a specific blueprint. I know I can call it from the page itself $page->blueprint() or call it from outside the current page page('my_page')->blueprint(), but can I get a blueprint simply based on the template or maybe the name of the blueprint blueprint('my_blueprint')? Because the said methods requires the page to exist so it’s not 100% reliable.

Any insight?

$bp = Kirby\Cms\Blueprint::find('pages/note');


Note that will return an array, not a Blueprint object like $page->blueprint() does.

Not sure if this makes sense:

$bp = Kirby\Cms\PageBlueprint::factory('pages/note' , '', page());

It returns a blueprint object, at least when used in a template.

Thanks for the reply.
Whenever I see those two colons side-by-side I know I’m in over my head.

Why? find() and factory() are static methods, i.e. member methods that you call without having to instantiate an object first (or an object to exist). $page->something() for example, requires that $page as object exists. Whereas Page::create() doesn’t require an object to exist first.

Some classes like the Str or Html class only have static methods.

I never familiarized myself with those methods, but there’s clearly no reason not to be friends with them. Thanks @texnixe