css - Magento local.xml 引用名称 ="head"到根目录中的 addItem

标签 css magento local

我需要能够调用我的 local.xml 中引用名称 =“head” 中的不同 CSS 文件,以使用来自根目录(而不是主题文件夹)的完整路径添加元素。

现在我有 skin_csscss/skin.css

那将是 http://www.domain.com/skin/theme_name/css/skin.css

我需要能够指向 http://www.domain.com/skin/OTHER-theme_name/css/skin.css

最佳答案

尝试做这样的事情:

<reference name="head">
    <action method="addLinkRel">
        <rel>stylesheet</rel>
        <href>http://www.domain.com/skin/OTHER-theme_name/css/skin.css</href>
    </action>
</reference>

addLinkRel 的第二个参数是您的魔法调味料。查看位于 app/code/core/Mage/Page/Html/Head.php 的 block 对象以获取更多详细信息。

关于css - Magento local.xml 引用名称 ="head"到根目录中的 addItem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15726459/

相关文章:

ios - 当用户点击通知时从 UNNotificationRequest 显示 ViewController

iphone - UILocalNotification和iOS 4.2

css - 将按钮类添加到使用 html 帮助程序的表格单元格 <td>

html - 垂直对齐问题

ios - 在 Objective-C 中调用 Magento SOAP API 时出错

magento - 使用soap api 访问magento 中的图像。无法访问缩略图。需要调整图像大小

html - 在不同列中显示动态创建的列表

CSS :before on inline SVG

magento - 结帐开始观察员

ssh - 禁用本地地址的开瓶器