[英]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 ?? 如何在自定义xml文件中修复常量,并在自定义模板phtml文件中获取常量?
Thanks for help :) 感谢帮助 :)
In your config.xml 在你的config.xml中
<default>
<settings>
<myconst>My Value</myconst>
</settings>
</default>
In your .phtml file 在您的.phtml文件中
<?php echo Mage::getStoreConfig('settings/myconst'); ?>
Maybe this could help, I can't try the code at the moment. 也许这会有所帮助,但目前我无法尝试使用该代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.