Open n-vs-m opened 11 months ago
This worked a treat when I hacked the plugin, so thank you! I was trying to add it to my site repo as an override so I don't have to use a hacked plugin, but couldn't seem to find the right location. It works to override form plugin templates. I have tried:
user/admin/themes/grav/templates/flex-objects/types/pages/
anduser/admin/templates/flex-objects/types/pages/
but neither seemed to work. Any idea where I might put this modified template to get it working?
I didn't find any suited user
directory...
It is possible to override the edit.html.twig from a theme folder:
user/themes/{path-to-your-theme}/admin/templates/flex-objects/types/pages/
oruser/data/{path-to-your-theme}/admin/templates/flex-objects/types/pages/
Thank you for the lines to make the custom modal working on edit page view.
See this discussion: https://github.com/getgrav/grav-plugin-admin/issues/2259
A custom modal button made like explained in the doc is not working when you are in edit page view. The button is displayed, but when you click on it a JS error prints.
It seems the file https://github.com/trilbymedia/grav-plugin-flex-objects/blob/develop/admin/templates/flex-objects/types/pages/edit.html.twig is missing some definition.
Adding a few lines before the closing if at the line 212 https://github.com/trilbymedia/grav-plugin-flex-objects/blob/f2a044ab813198108f677b3b4844d6696dda9161/admin/templates/flex-objects/types/pages/edit.html.twig#L210-L215
seems to work, here are the lines:
Sorry i can't make a proper PR as git is not configured on my grav.