覆盖替换模块 tpl 文件
Override replace module tpl file
我无法覆盖 prestashop 上的模板模块 tpl。我已将新的 tpl 文件放入 theme/module,尝试覆盖 prestashop 文件夹,但没有用。清除缓存无变化。
PS 模块(1.6 和 1.7)的模板覆盖属于 themes/[YOUR_THEME]/modules/
目录。
现在,根据您要覆盖的模块,您可能需要也可能不需要创建其他子目录,例如 views/templates/front
或 views/templates/hook
。只需查看原始模块 tpl 文件的位置即可获得确切路径。
要覆盖模块 tpl,您必须将文件夹结构和要覆盖的文件复制到主题中。
例如,如果你想修改模块 modulename 的 front.tpl 并且你有一个名为 你的主题名称
你必须复制:
/modules/modulename/views/templates/hook/front.tpl
到
/themes/yourthemename/modules/modulename/views/templates/hook/front.tpl
请注意,文件夹可能会有所不同,但您必须保持结构不变。
复制文件后您可以对其进行编辑,它将替换 tpl 的内容
我无法覆盖 prestashop 上的模板模块 tpl。我已将新的 tpl 文件放入 theme/module,尝试覆盖 prestashop 文件夹,但没有用。清除缓存无变化。
PS 模块(1.6 和 1.7)的模板覆盖属于 themes/[YOUR_THEME]/modules/
目录。
现在,根据您要覆盖的模块,您可能需要也可能不需要创建其他子目录,例如 views/templates/front
或 views/templates/hook
。只需查看原始模块 tpl 文件的位置即可获得确切路径。
要覆盖模块 tpl,您必须将文件夹结构和要覆盖的文件复制到主题中。
例如,如果你想修改模块 modulename 的 front.tpl 并且你有一个名为 你的主题名称
你必须复制:
/modules/modulename/views/templates/hook/front.tpl
到
/themes/yourthemename/modules/modulename/views/templates/hook/front.tpl
请注意,文件夹可能会有所不同,但您必须保持结构不变。
复制文件后您可以对其进行编辑,它将替换 tpl 的内容