boki Posted June 14, 2023 Share Posted June 14, 2023 Hi! Im trying to override this file with my module html/src/PrestaShopBundle/Resources/views/Admin/Product/ProductPage/Forms/form_combination.html.twig It works correctly but i need to add code before ,but is not possible. This is my code on this file html/modules/sdihidecombination/views/PrestaShop/Admin/Product/ProductPage/Forms/form_combination.html.twig {% extends '@!PrestaShop/Admin/Product/ProductPage/Forms/form_combination.html.twig' %} This is a test And i get this error A template that extends another one cannot include content outside Twig blocks. Did you forget to put the content inside a {% block %} tag? The parent don't have any block, then i can't use it... Any idea? Thanks! Link to comment Share on other sites More sharing options...
Nickz Posted June 14, 2023 Share Posted June 14, 2023 41 minutes ago, boki said: Im trying to override this file with my module html/src/PrestaShopBundle/Resources/views/Admin/Product/ProductPage/Forms/form_combination.html.twig It works correctly but i need to add code before ,but is not possible. if it works perfectly then I don't get the rest. What do you mean by adding a code before? Are you sure the the names capitaliced as they are are correct? Link to comment Share on other sites More sharing options...
boki Posted June 14, 2023 Author Share Posted June 14, 2023 20 minutes ago, Nickz said: if it works perfectly then I don't get the rest. What do you mean by adding a code before? Are you sure the the names capitaliced as they are are correct? Hi, I just want to add a new field here I have tried to overwrite the template, adding my button after or before the template, and move it by javascript, but finally I have seen that the template has the displayAdminProductsCombinationBottom hook, where I can do the same easier. I can't override all this file because i want to make compatible with multiple prestashop versions , and for older versions won't work.. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now