未添加 Prestashop 1.7 JS 文件
Prestashop 1.7 JS files not being added
使用 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
您需要手动删除或重命名文件
config/themes/{theme_name}/shop{shopid}.json
它比那个优先。它已经针对 1.7.1 进行了报告和解决。
然后你的资产中的代码将被添加到缓存中(以减少文件加载次数)。
使用 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
您需要手动删除或重命名文件
config/themes/{theme_name}/shop{shopid}.json
它比那个优先。它已经针对 1.7.1 进行了报告和解决。 然后你的资产中的代码将被添加到缓存中(以减少文件加载次数)。