I try to add a node to the module config like this:

$model = Mage::getConfig()->getModuleConfig('lemike_devmode');
$model->setNode('foo/bar/baz', 'qux', true /* overwrite */);
var_dump($model); // empty Mage_Core_Model_Config_Element

But it does not create the new nodes. The $model is just empty.

What went wrong here?

After that I guess Mage::getConfig()->saveCached() is correct for saving the new node, or?

有帮助吗?

解决方案

If is more easy to you, you could try with custom variables.

Hope it helps. The official Doc

Greetings.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top