magento 回退不工作
magento fallback not working
我已经设置了新的 1.9.3 magento。我在 default/default 文件夹中有一个 css 文件。它不存在于 custom_package/custom_theme 和 custom_package/default_theme 中。它直接进入 base/default。它应该签入 default/default。有什么方法可以实现适当的回退。
您需要通过为每个主题设置 etc/theme.xml
来创建回退,如下所示:
在custom_package/custom_theme/etc/theme.xml
文件中设置为:
<?xml version="1.0"?>
<theme>
<parent>custom_package/default_theme</parent>
</theme>
在custom_package/default_theme/etc/theme.xml
文件中设置为:
<?xml version="1.0"?>
<theme>
<parent>default/default</parent>
</theme>
在default/default/etc/theme.xml
文件中设置为:
<?xml version="1.0"?>
<theme>
<parent>base/default</parent>
</theme>
default/default 是 1.4 之前的 magento 的残余,只是为了向后兼容旧模块,它将回退到基本默认值并忽略默认默认值,除非您特别说明。简而言之,base/default 是新的 default/default
我已经设置了新的 1.9.3 magento。我在 default/default 文件夹中有一个 css 文件。它不存在于 custom_package/custom_theme 和 custom_package/default_theme 中。它直接进入 base/default。它应该签入 default/default。有什么方法可以实现适当的回退。
您需要通过为每个主题设置 etc/theme.xml
来创建回退,如下所示:
在
custom_package/custom_theme/etc/theme.xml
文件中设置为:<?xml version="1.0"?> <theme> <parent>custom_package/default_theme</parent> </theme>
在
custom_package/default_theme/etc/theme.xml
文件中设置为:<?xml version="1.0"?> <theme> <parent>default/default</parent> </theme>
在
default/default/etc/theme.xml
文件中设置为:<?xml version="1.0"?> <theme> <parent>base/default</parent> </theme>
default/default 是 1.4 之前的 magento 的残余,只是为了向后兼容旧模块,它将回退到基本默认值并忽略默认默认值,除非您特别说明。简而言之,base/default 是新的 default/default