简体   繁体   中英

MAgento - how to fix a constant in an xml file and get it in a template phtml file

how can I fix a constant in an custom xml file and get it in my custom template phtml file ??

Thanks for help :)

In your config.xml

<default>
    <settings>
        <myconst>My Value</myconst>
    </settings>
</default>

In your .phtml file

<?php echo Mage::getStoreConfig('settings/myconst'); ?>

Maybe this could help, I can't try the code at the moment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM