1

I want to load css file only for products in specific category. For that I'm adding

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

on the custom design tab on specific category in admin panel. That gives me

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

in the page source code.

The problem is, that this provide link from "base" skin, and I need to add it from "myCustom" skin.

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

Any ideas how to do this using addCss or any other action that I can provide in admin panel/config file?

4

2 回答 2

1

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

希望会有所帮助!

于 2013-11-13T08:11:50.507 回答
0

你的 xml 代码没问题。

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

于 2014-11-06T11:52:10.170 回答