【问题标题】:Magento: loading frontent layoutMagento:加载前端布局
【发布时间】:2017-06-04 21:32:45
【问题描述】:

我在 app/code/community/Foo/Bar/ 中有一个模块。现在,我写了大部分内容,但是我在每一页上都添加了一个问题。我的 config.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <FooBar_BrowserSearch>
            <version>0.1.0</version>
        </FooBar_BrowserSearch>
    </modules>
    <global>
        <helpers>
            <browsersearch>
                <class>FooBar_BrowserSearch_Helper</class>
            </browsersearch>
        </helpers>
    </global>
    <frontend>
        <layout>
            <updates>
                <mmbrowsersearch>
                    <file>browsersearch.xml</file>
                </mmbrowsersearch>
            </updates>
        </layout>
    </frontend>
    <default>
        <bs_general>
            <bs_general_settings>
                <bs_shortname>My Store Search</bs_shortname>
                <bs_description>My default search plugin description</bs_description>
                <bs_contact>admin@mysite.com</bs_contact>
            </bs_general_settings>
        </bs_general>
    </default>
</config> 

然后,我创建了 /app/design/frontend/base/default/layout/browsersearch.xml,如下所示:

<layout version="0.1.0">
    <browsersearch>
        <reference name="head">
            <action method="addLinkRel">
                <rel>search</rel>
                <href>myfile.xml</href>
            </action>
        </reference>
    </browsersearch>
</layout>

但是

【问题讨论】:

    标签: magento magento-layout-xml


    【解决方案1】:

    我刚刚将&lt;browsersearch> 更改为&lt;default>,它可以工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-12
      • 2015-03-24
      • 2012-09-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多