Skip to content
Grav 2.0 is officially stable. Read the announcement →
Plugins

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

admin

Started by yhancik 3 years ago · 3 replies · 673 views
3 years ago

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!

3 years ago

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

3 years ago

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 ;) 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: https://github.com/getgrav/grav-plugin-admin/issues/2259

last edited 08/16/23 by yhancik
3 years ago

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

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Vladimir Novak, 2 weeks ago
3 292 2 weeks ago
Plugins · by Mathieu Lecouturier, 3 weeks ago
3 277 3 weeks ago
Plugins · by Slebeig, 2 months ago
1 403 2 months ago
Plugins · by Rene, 2 months ago
2 574 2 months ago
Plugins · by Xavier, 3 months ago
2 490 3 months ago