Magento回归主题

shm*_*uli 0 magento

我在我的Magento实例上安装了一个主题,我想进一步自定义.我想这与Magento的后备层次结构类似,我的主题可以在默认包中回落,我应该能够以这样的方式构建我的目录,即通过维护类似的结构并依赖于我可以对主题的特定部分进行更改后退.

所以这是我的问题:如何通过这种方式设置后备设置来开发另一个主题的子主题?这是通过以某种方式构建目录来执行的,还是以其他方式执行?

谢谢!

小智 6

如果您使用的是Magento EE 1.14或CE 1.9,那么您可以利用此处描述的方法制作儿童主题:http ://www.magentocommerce.com/knowledge-base/entry/ee114-ce19-rwd-dev-guide http://alanstorm.com/magento_parent_child_themes

重要提示:在app/design/frontend/custompackage/customtheme/etc目录中有一个theme.xml非常重要,其中包含所显示的内容.无法正确配置theme.xml会阻止Magento加载您的主题.

您必须按照说明创建主题结构,并在其中放置一个theme.xml文件,其中包含以下代码:

Magento CE:

<?xml version="1.0"?>
<theme>
  <parent>custom_package/custom_parent</parent>
</theme>
Run Code Online (Sandbox Code Playgroud)

Magento EE:

<?xml version="1.0"?>
<theme>
  <parent>custom_package/custom_parent</parent>
</theme>
Run Code Online (Sandbox Code Playgroud)

对于版本EE v1.8 +或CE v1.4 +,您应该在此处参考:http: //www.magentocommerce.com/knowledge-base/entry/magentos-theme-hierarchy

Heirarchy如下:

  1. app/design/frontend/custom_package/custom_theme/&& skin/frontend/custom_package/custom_theme

如果没有找到,那么

  1. app/design/frontend/custom_package/default && skin/frontend/custom_package/default

如果没有找到,那么

  1. app/design/frontend/base/default && skin/frontend/base/default

如果没有找到,那么

  1. 抛出错误

基于此,您可以将您的默认主题放在custom_package/default,将您的子主题放在custom_package/custom_theme,custom_package/custom_theme中找不到的所有文件都会回退到custom_package/default.在下一级等级中寻求任何缺失的东西.

在管理>系统>配置>设计中设置包和主题