繁体   English   中英

在magento中创建子主题

[英]Create child theme in magento

我是mageto的新手,正在尝试创建子主题,以便在子主题中更改布局。

这是我的主主题或父主题的路径:

app/design/frontend/default/shoe_store

这是我的孩子主题的路径:

app/design/frontend/default/shoe_store_child

我正在按照创建子主题。

根据本教程,我创建了theme.xml并将其放置在

app/design/frontend/default/shoe_store_child/etc/theme.xml

这是theme.xml的代码

<theme>
 <title>Shoes Store Child</title>
 <parent>Magento/shoe_store</parent> 
 <media>
     <preview_image>media/preview.jpg</preview_image> 
 </media>

并将相关的css,js和图像放在coressponding目录中。

为了加载我的css和js文件,我创建了local.xml并将其放置在

app/design/frontend/default/shoe_store_child/layout/local.xml

这是local.xml的代码

    <reference name="head">
        <action method="addCss"><stylesheet>css/fonts.css</stylesheet></action>                
        <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
        <action method="addCss"><stylesheet>css/bootstrap.css</stylesheet></action>
        <action method="addCss"><stylesheet>css/bootstrap-responsive.css</stylesheet></action>
        <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action>
        <action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
        <action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
        <action method="addCss"><stylesheet>css/custom-style.css</stylesheet></action>
    </reference>

</default>

我在配置的“设计”部分进行了必要的更改,以使我的子主题处于活动状态,但是我在现场看不到任何影响。 我从页面的源代码检查了文件的路径,但是文件来自父主题。

请给我建议我在哪里犯错。

检查波纹管链接:

http://alanstorm.com/magento_parent_child_themes

您必须从系统>配置>设计中激活主题

http://www.hostknox.com/clients/knowledgebase/380/How-to-create-a-subtheme-in-Magento.html

我希望这能帮到您。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM