Jump to content

Insert my custom module page to product.tpl


Recommended Posts

I have my custom module page with controller(modules/mymodule/controllers/front/display.php, modules/mymodule/views/templates/front/display.tpl).

And I wanna embed this display.tpl to product.tpl(themes/classic/templates/catalog/product.tpl)

{block name='stitch_modal'}

	{include file=$modules_dir.'/mymodule/views/templates/front/display.tpl'}

{/block}

But it occurs error: Unexpected "'/mymodule/views/templates/front/display.tpl'".

Anybody can help me?

Link to comment
Share on other sites

Here I gave an example of how to create your own hook.

It can be easily adjusted as you need.

You can push your tpl file as a return.

return $this->setTemplate('module:mymodule/views/templates/front/display.tpl');

 

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