Open k8n opened 6 years ago
Themes ONLY support page blueprints at the root.
I’d like to make a case for it. Themes already support admin blueprints, e.g. as used in antimatter. It would be convenient and logical to let themes keep that stuff together with add_modals.
The widget plugin amends add_modals configuration; this technique works in themes. Same plugin supplies it’s own add_modal blueprints; yet themes cannot.
Is the order of plugin and theme initialization events the issue? I’m not sure where to look to fix this, but eager to do a PR.
Late to the party. Very keen to see this option myself. I support the arguments presented.
Would anyone know how to make admin “see” blueprints specified via add_modal configuration option within theme’s blueprints folder?
If I place ‘admin/pages/new_post.yaml’ under ‘user/blueprints’ it works. If I place it under ‘theme/active_theme/blueprints’ it does not work.
I’ve gone as far as doing scanBlueprints() within an appropriate event handler in the theme - nothing.
https://github.com/getgrav/grav-plugin-admin/blob/ac41a3a57a9274c96d64ef0ce9643406deff685e/themes/grav/templates/pages.html.twig#L360