0

I have follow instruction as per magento U, configuration XML. but XML configuration is not working from my side.

Here is code which i have done.

app/etc/First_Module.xml

<?xml version="1.0"?>

    <config>
        <modules>
            <First_Module>
                <active>true</active>
                <codePool>local</codePool>
            </First_Module>
        </modules>
    </config>

in local codePool

First/Module/etc/config.xml

<?xml version="1.0"?>
<config>
    <default>
        <some>
            <ranadom>
                <xpath>Here is value</xpath>
            </ranadom>
        </some>
    </default>
</config>

Now, I want to call xpath value in cmsController indexAction()

For that I have put code in cms/contollers/indexAction()

 echo "test";
 echo Mage::getStoreConfig('some/random/xpath');
 die;

With help of echo Mage::getStoreConfig('some/random/xpath'); i am call value of xpath Tag.

when my cms indexAction() will call at that time. I can see Here is value.

Can any one tell where i am wrong?

2
  • in config.xml you use 'ranadom' but then call the config value using 'random'. Just a typo? Commented Apr 25, 2013 at 9:44
  • Thank you Jonathan Hussey, In my config.xml you have a typo. Commented Apr 25, 2013 at 11:15

3 Answers 3

1

In your config.xml you have a typo. You wrote <ranadom> instead of <random>.

Sign up to request clarification or add additional context in comments.

Comments

1
  • Your config.xml code just saves the default value of some/ranadom/path xpath and it doesn't insert the value in database. Please check in your database table core_config_data if you have the row with path some/ranadom/path. If you don't have, create a system.xml file and put the declaration of some/ranadom/path xpath there, it will make insert to your core_config_data table.

  • Put your module declaration in your config.xml file.

  • You are getting the value by Mage::getStoreConfig('some/RANDOM/xpath');, while in your config.xml it's RANADOM

  • Did you clear the cache to reflect these changes?

1 Comment

Sorry I havent gone through the complete question
0

Go to system->cache management and check all items and disabled them. Then you need not flush your cache every time and you get the output dynamically just refreshing the web page.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.