How can I override edit.html.twig from the flex-objects plugin

I’m currently making hacky changes in /user/plugins/flex-objects/admin/templates/flex-objects/types/pages/edit.html.twig but i would like to move this to my own theme or plugin, but I’m not quite sure if this should actually go in a theme, plugin, where in the directory structure and with what additional configuration.

Thanks a lot!

@yhancik, Just curious, why would you want to edit a template of the Flex-Objects plugin? Can it not be done using blueprints?

Quite frankly I don’t know, that’s the best solution I’ve found so far to this issue I explained in a previous post. I can use blueprints to create custom page creation modals that work on the content list page, but the buttons/modals don’t show/work on other pages (in my case, I want it on the edit page).

As far as I can tell, some code is missing in the edit.html.twig template that allows to display the custom page creation button & modal. It’s even actually marked as a to-do in the source :wink: I thought it was a simple omission, but trying it out now I realise it’s more tricky than I thought (basically the modal seems to work… but the form values are overriden by the current page values - title, route, etc - instead of respecting what I input or even the blueprint defaults…). I have no idea what’s going on tbh.

See also: Dropdown add modals not working, JS error · Issue #2259 · getgrav/grav-plugin-admin · GitHub

@yhancik, OK, I see an issue has already been created. I’m afraid I haven’t got anything to add…