Jump to content

Override list_header tpl from a module


Recommended Posts

Hi everybody,

From a custom module I have this renderList function in my adminControler :

    public function renderList()
    {
        
		
		$this->tpl_list_vars['title'] = $this->l('ADD Products');

        $this->toolbar_btn = array();

        $this->_select = 'id_image, pl.name, p.cdt, supplier.`name` as supplier_name, a.`id_product` as productName, a.id_product,' . 'product_supplier.`product_supplier_reference` as product_supplier_reference, ' . 'sa.`quantity` as stockLevel,' . 'pp.`warning_stock_level`,' . 'pp.`ideal_stock_level`,' . 'a.`id_product` as qtyTo,' . 'a.`id_product` as wholesale_price, ' . 'a.id_product as tot_ligne';

         
			return parent::renderList();
    }

Then all is OK. But I need to add some fields and buttons in the template list_header under the title "Add products". 

So my idea is to override the template and I placed a list_header.tpl in my modules/myModule/view/templates/admin/myControllerName/helpers/list/list_header.tpl

In this template, only this test:

{extends file="helpers/list/list_header.tpl"}
{block name="override_header"}
       	<div class="panel-heading">     
          <div>Here all what I need</div>
        </div>   
{/block}

But nothing happens. How can I declare this override in my controller ? 

Many thanks for your help.

Link to comment
Share on other sites

  • 3 weeks later...

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