Jump to content

Using template inheritance inside a modul


KLewi

Recommended Posts

Hi!

I'm wondering if I can use the PrestaShop template inheritance feature, to override a frontController meta_description from any module. 

Based on the documentation seems that it can be done, but I have not been able to do it.

I tried the following code:

The module PHP

    public function hookHeader($params)
    {
        return $this->display(__FILE__, 'views/templates/hook/_head_seo.tpl');
    }

and the _head_seo.tpl 
 

{extends file='page.tpl'}

{block name='head_seo_description'} Some new fancy meta description {/block}

Or am I approaching things in the wrong way?

Thanks!

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...