Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to get some data from config file. Resolved
 
BLIZZARD
Jr. Member
 
Total Posts:  21
Joined:  2008-12-15
Kharkov, Ukraine
 

How to get some data from config file in code (Category controller.php for example) and in templates?
for exapmle from /app/etc/local.xml:
...
<config>
<global>
<install>
<date><![CDATA[Fri, 19 Dec 2008 12:35:21 +0000]]></date>
</install>
...
<myparams>
<name>blabla</name>
<title>blabla2</title>
</myparams>
...
...
<config>

tnx!
p.s. Probably exists another way.. it’s needed some global config - for accesseble parameter all over website

 
Magento Community Magento Community
Magento Community
Magento Community
 
BLIZZARD
Jr. Member
 
Total Posts:  21
Joined:  2008-12-15
Kharkov, Ukraine
 

I’ve found decision smile

Mage::app()->getConfig()->getNode(’global/myparams/name’);

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top