【发布时间】:2010-01-07 09:20:05
【问题描述】:
我想在 magento 中更改搜索图像。在 magento 中搜索时,图像名称为 btn_search.gif。现在它从皮肤/前端/默认/默认/图像中获取图像。该文件是 /app/design/frontend/default/default/template/catalogsearch/form.mini.phtml 其中提到这个标签为
<input id="search-button" type="image" src="<?php echo $this->getSkinUrl('images/btn_search.gif') ?>" alt="<?php echo $this->__('Search') ?>" />
我检查了代码,我发现我们可以将语言环境作为 _type 在 this as 中传递
<input id="search-button" type="image" src="<?php echo $this->getSkinUrl('images/btn_search.gif', array('_type'=>'local')) ?>" alt="<?php echo $this->__('Search') ?>" />
但是当我检查代码时,这只会在语言环境目录中检查该文件是否存在于该语言环境中。如果存在,那么它将拍摄皮肤图像。我想使用该区域设置图像而不是该皮肤图像。
所以当我点击法国商店时,我会得到我在 /app/design/frontend/default/default/locale/fr_FR/images/btn_search.gif 中设置的图像
我在 /app/code/core/Mage/Core/Model/Design/Package.php 中检查 getSkinUrl 的代码。我发现他检查了文件的语言环境,但它返回了皮肤 url。
有没有什么方法可以返回locale url?
【问题讨论】: