arifur rahman
arifur rahman

Reputation: 264

How to template prestashop module admin section with smarty

I want to build a module where , we like to build the form and table using smarty.

In prestashop module controller load template file like /modules/my_module/views/templates/front/my_module.tpl

where admin will be /modules/my_module/views/templates/admin/admin_module.tpl

My point is how can i show this admin_module.tpl in the prestashop module configuration page.

Upvotes: 3

Views: 6318

Answers (1)

Mantas
Mantas

Reputation: 4296

It is really easy. You just have to create views/templates/admin/foo.tpl and then only display your template in getContent() method:

public function getContent()
{
    return $this->display(__FILE__, 'views/templates/admin/foo.tpl');
}

Upvotes: 7

Related Questions