randombytes Posted August 20, 2021 Share Posted August 20, 2021 Hello, I'm trying to customize the classic theme in Prestashop 1.7.7.7. I can't seem to be able to make the templates from the child theme be loaded instead of the ones from the parent theme : In the administration, I generate the child theme from the classic theme. I unzip it and add the "templates" folder and inside it the "index.tpl" template. I edit it to add "parent:" before the page.tpl in the extend line. I add some noticable modification (for instance "test child" after the content section). I then zip, load and activate the theme, and my modification is not visible. The same modification on the parent theme shows up. I'v tried multiple solutions and followed the documentation to the letter to no avail : only the parent template files are loaded, no modification from a template in the child theme is ever visible. I've disabled every clache I could find, even manually removed the cache to force a rebuild. Modifications to the custom.css file in the child theme work properly. Any idea what could prevent the child templates from ever being used? Link to comment Share on other sites More sharing options...
endriu107 Posted August 20, 2021 Share Posted August 20, 2021 Do you switch your theme to child in theme settings if yes, can you put sample of code you edit? Link to comment Share on other sites More sharing options...
randombytes Posted August 20, 2021 Author Share Posted August 20, 2021 Yes, I do switch to the child theme in the theme settings, as the custom css is applied. Here is an exemple of the index.tpl file that I add to child_classic template folder : {extends file='parent:page.tpl'} {block name='page_content_container'} <section id="content" class="page-home"> test child {block name='page_content_top'}{/block} {block name='page_content'} {block name='hook_home'} {$HOOK_HOME nofilter} {/block} {/block} </section> {/block} As you can see, I should see the "test child" text appear on my home page. The same modification directly in the classic index.tpl file properly shows the text. Link to comment Share on other sites More sharing options...
endriu107 Posted August 20, 2021 Share Posted August 20, 2021 It should work even when you remove "parent:" it should work too. 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