没有添加Prestashop 1.7 JS文件

时间:2017-02-09 16:17:27

标签: themes yaml prestashop prestashop-1.7

使用Prestashop 1.7并更新了我的theme.yml文件,如下所示,但它没有添加到文件中。该文件位于该目录中,但它没有被拉入。对代码的任何建议?我想要包含JS文件,但它没有被引入。

assets:
  # If you're using this theme as child and you want to load
  # the parent theme assets, uncomment this line.
  # use_parent_assets: true

  # The following lines are showing how to load assets in your page
  # Uncomment and change value to start loading css or js files
 css:
   all:
     - id: theme-custom
       path: assets/css/custom.css
#    product:
#      - id: product-style
#        path: assets/css/product.css
#        media: all
#        priority: 200
 js:
   all:
      - id: slick
        path: assets/js/external-lib.js
        priority: 30
        position: bottom
   cart:
     - id: theme-custom
       path: assets/js/custom.js

1 个答案:

答案 0 :(得分:3)

您需要手动删除或重命名文件

config/themes/{theme_name}/shop{shopid}.json

它优先于那一个。已经报道并解决了1.7.1。 然后,资产中的代码将添加到缓存的代码中(以减少文件加载次数)。