[英]MAgento - how to fix a constant in an xml file and get it in a template phtml file
如何在自定義xml文件中修復常量,並在自定義模板phtml文件中獲取常量?
感謝幫助 :)
在你的config.xml中
<default>
<settings>
<myconst>My Value</myconst>
</settings>
</default>
在您的.phtml文件中
<?php echo Mage::getStoreConfig('settings/myconst'); ?>
也許這會有所幫助,但目前我無法嘗試使用該代碼。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.