Closed jenstornell closed 8 years ago
I think I'm going to add the following to the Readme, rather than including it in the repository itself:
kirby()->set('page::method', 'architect', function($page) {
return Architect::blueprint($page->intendedTemplate());
});
This way, developers can add the functionality easily, without the method name colliding with any of their fields.
One major caveat: I opened a thread about the trouble I had making page method extensions within config.php
. Whoever is implementing the plugin has to drop these into a new plugin file, not their config fileā¦
Go for a plugin approach. At least I would. Maybe even make an example plugin with all the available field and page methods.
Implemented in the readme in f0bebd2de5d91ab358992f67591e71badcbf5a35.
Something like this:
The benefit is that this page contains an intended template and the page blueprint can be used.