0

i Had the magento 1.x config.xml file,i need that write into magento 2.0 structure. For ex:

2.0.0

<frontend>
    <layout>
        <updates>
            <FacebookComments>
                <file>socialshare/FacebookComments.xml</file>
            </FacebookComments>
        </updates>
    </layout>
</frontend>

<adminhtml>
    <acl>
        <resources>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <facebookcomments translate="title" module="facebookcomments">
                                        <title>Social Share - Facebook Comments</title>
                                    </facebookcomments>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>      
</adminhtml>

<global>
    <resources>
        <FacebookComments_setup>
            <setup>
                <module>SocialShare_FacebookComments</module>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </FacebookComments_setup>
        <FacebookComments_write>
            <connection>
                <use>core_write</use>
            </connection>
        </FacebookComments_write>
        <FacebookComments_read>
            <connection>
                <use>core_read</use>
            </connection>
        </FacebookComments_read>
    </resources>
    <blocks>
        <FacebookComments>
            <class>SocialShare_FacebookComments_Block</class>
        </FacebookComments>
    </blocks>
    <helpers>
        <facebookcomments>
            <class>SocialShare_FacebookComments_Helper</class>
        </facebookcomments>
    </helpers>
    <models>
        <facebookcomments>
            <class>SocialShare_FacebookComments_Model</class>
        </facebookcomments>
    </models>
</global>

<default>
    <facebookcomments>
        <conf>
            <enabled>0</enabled>
            <posts>5</posts>
            <width>500</width>
            <colorscheme>light</colorscheme>
        </conf>
    </facebookcomments>
</default>

this above config.xml is magento 1.x,this file convert into magento 2.0 structure.

2 Answers 2

1

In Magento 2 there are many separations of config.xml file. For that you have to refer documentation.

http://devdocs.magento.com/guides/v2.0/architecture/bk-architecture.html

http://devdocs.magento.com/guides/v2.0/extension-dev-guide/bk-extension-dev-guide.html

1

in magneto2 no need to mention block, helper, resources, table name, etc. in config file

and also it split many xml file

ex :- routes.xml crontab.xml

cross check catalog module which will help you

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.