Magento Custom Module How to save a variable in config.xml

I have a custom module that works fine, but I would like to be able to store variables in config so that I can use them in my code. (For example, the default error message)

I think I can access them using Mage :: getStoreConfig ('/ some / path / here'); but I don’t know how to add them to config.xml modules (myname / mymodule / etc / config.xml) so that I can use them in my code?

Who has a key? Thank!

+5
source share
1 answer

, , Admin.

, config.xml node default, .

<config>
    <!-- ... -->
    <default>
        <web>
            <default>
                <cms_home_page>home</cms_home_page>
                <cms_no_route>no-route</cms_no_route>
                <cms_no_cookies>enable-cookies</cms_no_cookies>
                <front>cms</front>
                <no_route>cms/index/noRoute</no_route>
                <show_cms_breadcrumbs>1</show_cms_breadcrumbs>
            </default>
        </web>
        <cms>
            <wysiwyg>
                <enabled>enabled</enabled>
            </wysiwyg>
        </cms>
    </default>
    <!-- ... -->
</config>

config.xml

web/default/cms_home_page
web/default/cms_no_route
web/default/cms_no_cookies
web/default/front
web/default/no_route
web/default/show_cms_breadcrumbs

cms/wysiwyg/enabled
+8

All Articles