【发布时间】:2015-06-18 13:52:58
【问题描述】:
我刚刚使用 realfavicongenerator 创建了一个网站图标集,现在想在我的网站上实现移动设备的代码。
我应该在哪个页面上将它添加到页眉部分?只是我的 Magento 商店的 CMS 主页?
【问题讨论】:
标签: html ios iphone favicon magento-1.9
我刚刚使用 realfavicongenerator 创建了一个网站图标集,现在想在我的网站上实现移动设备的代码。
我应该在哪个页面上将它添加到页眉部分?只是我的 Magento 商店的 CMS 主页?
【问题讨论】:
标签: html ios iphone favicon magento-1.9
您应该在 YOUR_THEME/iphone/template/page/html/head.phtml 中添加您的代码
添加类似的东西
<link rel="apple-touch-icon" href="<?php echo $this->getSkinUrl('touch_icon.png') ?>"/>
更多信息here。
【讨论】:
/html/magento/app/design/frontend/default/iphone/template/page/html 但我不使用 magento 默认主题。所以我需要将/iphone/template/page/html 添加到我正在使用的主题中吗?
这应该通过 XML 完成,而不是像 taschert 推荐的那样直接在模板中完成:
<action method="addLinkRel">
<rel>apple-touch-icon</rel>
<href>/path/to/the/icon.png</href>
</action>
例如在您的自定义主题的local.xml 文件中。
【讨论】: