Jump to content

Module not displaying more than 2 tpls


Amazzing

Recommended Posts

Hello,

 

I have a module that should display 3 different tpl files for different hooks. 

The hooks are registered on install:

$this->registerHook('displayAttributeGroupForm')
$this->registerHook('displayAttributeForm')
$this->registerHook('displayLeftColumn')
templates assigned for selected hooks:
//attribute page
public function hookDisplayAttributeForm($params){ 
return ($this->display(__FILE__, 'views/templates/admin/attform.tpl'));
}

//attribute group page
public function hookDisplayAttributeGroupForm($params) {
return ($this->display(__FILE__, 'views/templates/admin/attrgroup.tpl'));
}

//frontoffice
public function hookDisplayLeftColumn($params)
{return ($this->display(__FILE__, 'views/templates/frontend/leftcol.tpl'));
}

Now, the first 2 files are displayed properly.

And for some reason leftcol.tpl is just not showing up in the frontoffice, nomatter what I do. At the bottom of left column I have 'No template was found for this module.'.

Of cource, all 3 files are created and exist in corresponding categories. 

 

If I choose to display attrgroup.tpl in LeftColumn, it works. And if I try to display leftcol.tpl in hookDisplayAttributeGroupForm it doesn't show up. I tried changing names, tried creating new files, tried uploading them in different ways. Checked the files permissions. It is set to 644 for all 3 files. 

So it comes out that only 2 files are working for the module and it doesn't want to recognize any additional templates.

 

What could be the reason for that?

 

 

Edited by Amazzing (see edit history)
Link to comment
Share on other sites

Hello,

 

What version do you use ?

 

 

return $this->display(__FILE__, 'views/templates/frontend/leftcol.tpl');

 

If you want match 1.5 path it would be rather /front/ rather than /frontend/

 

What happen if you had this to leftcolumn hook ?

 

var_dump(file_get_contents(__FILE__, 'views/templates/frontend/leftcol.tpl'));

 

Regards

Link to comment
Share on other sites

@math_php, thanks for the reply, but I gave up and deleted that module. I made a backup a few days before that happened and just kept on the development with backup version. Now module displays more than 2 tpls. And I dont' exactly know what was the reason for that behaviour. 

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