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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

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

admin

Started by yhancik 3 years ago · 3 replies · 528 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 Rene, 1 week ago
2 47 1 week ago
Plugins · by Xavier, 4 weeks ago
2 56 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1182 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 50 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 74 2 months ago