Search code examples
magentomagento-layout-xml

Magento: loading frontent layout


I have a module in app/code/community/Foo/Bar/. Now, I wrote most of it, but I have a problem adding a into head on every page. My 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> 

then, I've created /app/design/frontend/base/default/layout/browsersearch.xml, like so:

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

but the


Solution

  • I've just changed <browsersearch> into <default>, and it works.