【问题标题】:How to template prestashop module admin section with smarty如何使用 smarty 模板化 prestashop 模块管理部分
【发布时间】:2013-06-25 07:36:52
【问题描述】:

我想构建一个模块,我们喜欢使用 smarty 构建表单和表格。

在 prestashop 模块控制器中加载模板文件,如 /modules/my_module/views/templates/front/my_module.tpl

admin 将是 /modules/my_module/views/templates/admin/admin_module.tpl

我的意思是如何在 prestashop 模块配置页面中显示这个 admin_module.tpl。

【问题讨论】:

    标签: module smarty prestashop


    【解决方案1】:

    这真的很容易。你只需要创建views/templates/admin/foo.tpl 然后只在getContent() 方法中显示你的模板:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多