dqd3690 2017-09-09 06:09
浏览 37

Prestashop 1.6 smarty override {include file = ...}未被覆盖

I am testing overriding with Prestashop 1.6 and i have problem with Smarty. In admin themes file tpl exists function {include file=...}.

In directory override I replace this file and i created file which it has included, but it doesn't read this file from {include file=...}.

Any ideas?

  • 写回答

1条回答 默认 最新

  • doy2255 2017-09-11 05:47
    关注

    You need to override both files, the included file and the file which includes.

    In the line where {include} is used the path must be:

    {include file='../_current_dir_/_file_.tpl'}

    e.g. you want to override cart rules template:

    override/controllers/admin/templates/cart_rules/informations.tpl

    Then you need the template which includes it. form.tpl (in this case):

    override/controllers/admin/templates/cart_rules/form.tpl

    Inside form.tpl you need to change {include} of informations.tpl to:

    {include file='../cart_rules/informations.tpl'}

    Even both templates are in the same level it is for some reason needed to go one level up.

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度