【问题标题】:prestashop - custom image size defined by themeprestashop - 由主题定义的自定义图像大小
【发布时间】:2014-02-27 22:42:03
【问题描述】:

是否有任何选项/代码可以按主题定义/更改图像大小,以便在应用主题时它会出现在后台列表中?

我正在创建新主题,我需要为其添加/修改一些图像尺寸,如果可以在主题内定义而不是每次应用主题时在后台手动定义它,这将更容易。

我花了一些时间在谷歌上搜索,但没有运气;-(

【问题讨论】:

    标签: themes prestashop prestashop-1.5


    【解决方案1】:

    安装主题时,“themeinstallator”模块正在使用 config.xml 文件。

    假设您的主题 zip 文件具有以下文件系统:

    /modules/*.*
    /themes/yourtheme/*.*
    /config.xml
    

    在主文件夹中你必须有 config.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <theme version="1.0" name="yourtheme" directory="yourtheme">
      <images>
        <image name="small_default" width="71" height="71" products="true" categories="true" manufacturers="true" suppliers="true" scenes="false"/>
        ....
      </images>
    </theme>
    

    属性和值对应于 BackOffice > Preferences -> Images 页面中的属性和值。

    最简单的方法就是通过“themeinstallator”导出主题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-08-05
      • 2020-07-15
      • 1970-01-01
      • 2016-10-24
      • 2019-08-29
      • 2014-05-23
      • 1970-01-01
      • 2022-05-30
      相关资源
      最近更新 更多