Jump to content

Child theme only loading parent template


Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...