【问题标题】:Add iOS mobile favicon images to magento Shop将 iOS 移动网站图标图像添加到 magento 商店
【发布时间】:2015-06-18 13:52:58
【问题描述】:

我刚刚使用 realfavicongenerator 创建了一个网站图标集,现在想在我的网站上实现移动设备的代码。

我应该在哪个页面上将它添加到页眉部分?只是我的 Magento 商店的 CMS 主页?

【问题讨论】:

    标签: html ios iphone favicon magento-1.9


    【解决方案1】:

    您应该在 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 添加到我正在使用的主题中吗?
    • 是的,您需要在您的主题中添加该文件。
    【解决方案2】:

    这应该通过 XML 完成,而不是像 taschert 推荐的那样直接在模板中完成:

    <action method="addLinkRel">
        <rel>apple-touch-icon</rel>
        <href>/path/to/the/icon.png</href>
    </action>
    

    例如在您的自定义主题的local.xml 文件中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-06-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多