0

Well, I am just learning to create modules, I am currently doing the part 5 of AllanStorm's tutorials this is the link:

http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-5-magento-models-and-orm-basics

I am currently in the part of adding the inside the config.xml, the code says the following:

<global>
<!-- ... -->
<models>
    <!-- ... -->
    <weblog_resource>
        <class>Magentotutorial_Weblog_Model_Resource</class>
    </weblog_resource>
</models>
</global>

yet following the tutorial, I don't know what is, and where should I place everything inside the config.xml, currently I am trying to add it like the following, but it doesn't work:

<config>
<modules>
    <TBGTEST_Helloworld>
        <version>0.1.0</version>
    </TBGTEST_Helloworld>
</modules>
    <frontend>
        <routers>
            <helloworld>
                <use>standard</use>
                <args>
                    <module>TBGTEST_Helloworld</module>
                    <frontName>helloworld</frontName>
                </args>
            </helloworld>
        </routers>
        <models>
            <helloworld>
                <class>TBGTEST_Helloworld_Model</class>
                <!--
                need to create our own resource, can't just
                use core_resource
                -->
                <resourceModel>helloworld_resource</resourceModel>
            </helloworld>
        </models>
    </frontend>

at the same time I don't know what the tag means, i am sorry if this is so basic, I tried to discuss it in the tutorial but the discussion box at the bottom is deactivated. Thanks for the help..

0

Your config.xml file should be following

<config>
<modules>
    <TBGTEST_Helloworld>
        <version>0.1.0</version>
    </TBGTEST_Helloworld>
</modules>
<frontend>
    <routers>
        <helloworld>
            <use>standard</use>
            <args>
                <module>TBGTEST_Helloworld</module>
                <frontName>helloworld</frontName>
            </args>
        </helloworld>
    </routers>
</frontend>
<global>
    <models>
        <helloworld>
            <class>TBGTEST_Helloworld_Model</class>
            <resourceModel>helloworld_resource</resourceModel>
        </helloworld>
        <helloworld_resource>
            <entities>
                <tablename>
                    <table>table_name</table>
                </tablename>
            </entities>
        </helloworld_resource>
    </models>
</global>

Take a look following link which can help you to understand config file tag

magento module configuration file reference

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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