【问题标题】:Magento css from custom skin by addCss来自 addCss 的自定义皮肤的 Magento css
【发布时间】:2013-11-25 17:45:28
【问题描述】:

我只想为特定类别的产品加载 css 文件。为此,我正在添加

<reference name="head">
        <action method="addCss"><link>custom.css</link></action>
</reference>

在管理面板中特定类别的自定义设计选项卡上。这给了我

<link rel="stylesheet" type="text/css" href="http://domain.com/skin/frontend/base/default/custom.css" media="all" />

在页面源代码中。

问题是,这提供了“基础”皮肤的链接,我需要从“myCustom”皮肤添加它。

<link rel="stylesheet" type="text/css" href="http://domain.com/skin/frontend/myCustom/default/custom.css" media="all" />

任何想法如何使用 addCss 或我可以在管理面板/配置文件中提供的任何其他操作来做到这一点?

【问题讨论】:

    标签: css magento


    【解决方案1】:

    我认为您尚未从管理员设置“皮肤(图像/CSS)”的值。转到 System->Configuration->GENERAL/Design->Themes->Skin (Images / CSS) 并添加您的自定义主题名称。

    希望能有所帮助!

    【讨论】:

    • 不幸的是它被设置了。
    【解决方案2】:

    你的 xml 代码没问题。

    文件必须存在于 /skin/yourpackage/yourtheme/ 中才能加载(不在 /skin/yourpackage/yourtheme/css/ 中)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-05-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-13
      • 2011-08-17
      相关资源
      最近更新 更多